A B C D E F G H I L M N O P Q R S T U W X Y

A

a - Variable in class Quicksort
The array of Objects to be sorted.
addBlck(int, int) - Method in class Sample
Add coordinates of a blockage square.
addSpam(int, int) - Method in class Sample
Add coordinates of a spam square.
adjacent(Pair) - Method in class Pair
Indicate whether this Pair is adjacent on the Grid to the argument Pair.
append(OpenList) - Method in class OpenList
Create a new list formed by elements of this list followed by those of the argument list.
append(OpenList, OpenList) - Static method in class OpenList
Create a new list formed by elements of the first argument followed by those of the second.
AppletGrid - class AppletGrid.
 
AppletGrid(Sample) - Constructor for class AppletGrid
Construct a grid from a Sample, which includes the relevant size information and spam settins.
apply(Object) - Method in interface Function1
Apply this Function1 to an Object argument, returning an Object.
apply(Object) - Method in class Ranger
Apply this Ranger object to an Object x, which should be a Number.
apply(Object) - Method in class Scaler
Apply this Scaler object to an Object x, which should be a Number.
apply(Object, Object) - Method in interface Function2
Apply this Function1 to two Object arguments, returning an Object.
apply(Object, Object) - Method in class Multiplier
Apply this Multiplier object to two Objects, both of which should be Numbers.
args - Static variable in class Copier
 
assoc(Object, OpenList) - Static method in class OpenList
Find out whether the first argument occurs as the first element of any pair in the second argument, an association list.

B

back - Variable in class DLDeque
the Dcell at the back
backgroundColor - Variable in class BaseApplet
 
BaseApplet - class BaseApplet.
BaseApplet with methods intended to be over-ridden to create games, etc.
BaseApplet() - Constructor for class BaseApplet
 
BLANK - Static variable in class Grid
value for the blank character
BLOCKAGE - Static variable in class Grid
value for a blockage character
blockColor - Static variable in class AppletGrid
Color used in applet to draw blockage
blockEnumeration() - Method in class Sample
Get an enumeration of the blockList of this Sample.
blockList - Variable in class Sample
list of pairs indicating coordinates of blockage in this sample
BreadthFirstApplet - class BreadthFirstApplet.
Applet for demonstrating breadth-first search
BreadthFirstApplet.DelayChoiceListener - class BreadthFirstApplet.DelayChoiceListener.
An inner class defining a listener for ItemEvents to the delay choice.
BreadthFirstApplet.DelayChoiceListener() - Constructor for class BreadthFirstApplet.DelayChoiceListener
 
BreadthFirstApplet.SampleChoiceListener - class BreadthFirstApplet.SampleChoiceListener.
An inner class defining a listener for ItemEvents to the sample choice.
BreadthFirstApplet.SampleChoiceListener() - Constructor for class BreadthFirstApplet.SampleChoiceListener
 
BreadthFirstApplet() - Constructor for class BreadthFirstApplet
 

C

clear(Pair) - Method in class Grid
Set the contents of a Square to blank
clearOffScreenBuffer() - Method in class BaseApplet
Clear the off-screen buffer.
clearParents() - Method in class Grid
Clear all parents in preparation for a search.
clone() - Method in class OpenList
Return a clone of this OpenList.
col - Variable in class Pair
 
cols - Variable in class Grid
the number of columns of the Grid
cols - Variable in class Sample
the number of columns in the grid for this sample
cons(Object) - Method in class OpenList
Return a new OpenList constructed from this list and a first.
cons(Object, OpenList) - Static method in class OpenList
Return a new OpenList constructed from its first and rest.
contains(int) - Method in class Square
See if the Square contains specified contents.
contains(int, int, int) - Method in class Grid
Determine whether a Square contains specified contents.
contents - Variable in class Square
the contents of the Square
continueRunning() - Method in class BaseApplet
Over-ride this in the derived class.
Copier - class Copier.
Copier exists to provide one static method, maybeClone which makes a clone of its argument, or returns the argument itself if not.
Copier() - Constructor for class Copier
 
createOffScreenBuffer() - Method in class BaseApplet
Create the off-screen buffer.
currentDelay - Variable in class BaseApplet
 

D

Data - Variable in class DLDeque.Dcell
the data in this Dcell
defaultLeftParen - Static variable in class OpenList
the default left paren used when a list is printed.
defaultRightParen - Static variable in class OpenList
the default right paren used when a list is printed
defaultSpacer - Static variable in class OpenList
the default space used when a list is printed
delayChoice - Variable in class BreadthFirstApplet
 
delayOption - Static variable in class BreadthFirstApplet
 
Deque - interface Deque.
A Deque (double-ended queue) is a repository for objects that maintains insertion order.
dequeue() - Method in interface Queue
Remove an Object from the queue.
dequeue() - Method in class SLQueue
Remove an Object from the queue.
dequeueBack() - Method in class DLDeque
Remove an Object from the back of the Deque.
dequeueBack() - Method in interface Deque
Remove an Object from the back of the Deque.
dequeueFront() - Method in class DLDeque
Remove an Object from the front of the Deque.
dequeueFront() - Method in interface Deque
Remove an Object from the front of the Deque.
DESCbody - Static variable in class Grid
value for the DESC body character (used in a07)
DESCbodyColor - Static variable in class AppletGrid
Color used in applet to draw DESC body
DESCendColor - Static variable in class AppletGrid
Color used in applet to draw DESC end
DESChead - Static variable in class Grid
value for the DESC head character (used in a07)
DLDeque - class DLDeque.
DLDeque is an implementation of Deque, a repository for Objects.
DLDeque.Dcell - class DLDeque.Dcell.
A Dcell stores one Object in the Queue and points to the immediately following and preceding Dcells, if any.
DLDeque.Dcell(Object, DLDeque.Dcell, DLDeque.Dcell) - Constructor for class DLDeque.Dcell
construct a Dcell referencing the next and previous Dcell and containing specified data
DLDeque() - Constructor for class DLDeque
Construct an empty DLDeque.
draw(Graphics, int, int, int) - Method in class AppletGrid
Draw the grid in the Graphics, at a specified pair offsets and with a certain feature size.
drawBlockage(Graphics, int, int, int) - Method in class AppletGrid
Draw blockage at the specified position.
drawDESCbodyCell(Graphics, int, int, int) - Method in class AppletGrid
Draw a body cell of a DESC.
drawDESCendCell(Graphics, int, int, int) - Method in class AppletGrid
Draw a end (head or tail) cell of a DESC.
drawEverything() - Method in class BreadthFirstApplet
Draw the results of one step.
drawGrid() - Method in class BreadthFirstApplet
Draw the grid and its contents.
drawSpam(Graphics, int, int, int) - Method in class AppletGrid
Draw spam at the specified position.
drawSteps(int) - Method in class BreadthFirstApplet
Draw the String indicating number of steps.

E

elements() - Method in class OpenList
Return an Enumeration of the elements of this OpenList.
EmptyQueueException - exception EmptyQueueException.
This exception is thrown when an attempt is made to dequeue from and empty Queue or Deque.
EmptyQueueException() - Constructor for class EmptyQueueException
 
enqueue(Object) - Method in interface Queue
Insert an Object in the queue.
enqueue(Object) - Method in class SLQueue
Insert an Object in the queue.
enqueueBack(Object) - Method in class DLDeque
Insert an Object at the back of the Deque.
enqueueBack(Object) - Method in interface Deque
Insert an Object at the back of the Deque.
enqueueFront(Object) - Method in class DLDeque
Insert an Object at the front of the Deque.
enqueueFront(Object) - Method in interface Deque
Insert an Object at the front of the Deque.
equals(Object) - Method in class OpenList
Return true if this list is equal to the argument list.
equals(OpenList, OpenList) - Static method in class OpenList
Return true if the two OpenLists are equal, in the sense of having the equal elements in both listss.
equals(Pair) - Method in class Pair
Equality test for Pairs.
explode(String) - Static method in class OpenList
Explode the argument String into a list of Characters wrapping the characters of the String.

F

factor - Variable in class Scaler
 
First - Variable in class OpenList
the Object in the first cell of a non-empty list
First - Variable in class SLQueue.Cell
the data in this Cell
first() - Method in class OpenList
Return the first of this non-empty OpenList.
first(OpenList) - Static method in class OpenList
Return the first of the argument, a non-empty OpenList.
firstException - Static variable in class OpenList
exception message for first of empty list
foregroundColor - Variable in class BaseApplet
 
fromArray(Object[]) - Static method in class OpenList
Create an OpenList from an array of Objects.
front - Variable in class DLDeque
the Dcell at the front
Function1 - interface Function1.
Function1 is an interface specification for a function object of 1 argument.
Function2 - interface Function2.
Function2 is an interface specification for a function object of 2 arguments.

G

get() - Method in class Square
Return the contents of the Square.
get(int, int) - Method in class Grid
Get the contents of a Square
getCols() - Method in class Sample
Get the number of columns of this Sample.
getParent(Pair) - Method in class Grid
Get the parent of a Square located at a particular Pair of coordinates.
getRows() - Method in class Sample
Get the number of rows of this Sample.
getSquare(Pair) - Method in class Grid
Get the Square located at a particular Pair of coordinates.
getTitle() - Method in class Sample
Get the synthetic title for this Sample.
grid - Variable in class BreadthFirstApplet
 
Grid - class Grid.
 
Grid(int, int) - Constructor for class Grid
Construct a grid of a given size.
Grid(Sample) - Constructor for class Grid
Construct a grid from a Sample, which includes the relevant size information and spam settins.
gridColor - Static variable in class AppletGrid
Color used in applet to draw Grid
gridSize - Variable in class BreadthFirstApplet
 

H

hasDESC(int, int) - Method in class Grid
Check whether a Square has a DESC end or body cell.
hasDESCbody(int, int) - Method in class Grid
Check whether a Square has a DESC body cell.
hasDESCend(int, int) - Method in class Grid
Check whether a Square has a DESC end cell.
hasMoreElements() - Method in class OpenListEnumeration
Indicate whether there are elements remaining in the enumeration.
hasSpam(int, int) - Method in class Grid
Indicate whether a particular Square has spam.
head - Variable in class SLQueue
the Cell containing the next Object to be removed

I

image - Variable in class BaseApplet
 
implode() - Method in class OpenList
Implode this OpenList into a single String.
implode(OpenList) - Static method in class OpenList
Implode the contents of an OpenList into a single String.
increment - Variable in class Ranger
 
init() - Method in class BaseApplet
Initialize the applet.
init() - Method in class BreadthFirstApplet
Initialize the applet.
initialize() - Method in class Grid
Construct the Squares of the Grid and initialize them.
initialSampleIndex - Static variable in class BreadthFirstApplet
 
inRange(int, int) - Method in class Grid
Check whether a Square is within the Grid.
isBlank(int, int) - Method in class Grid
Indicate whether a particular Square is blank.
isBlocked(int, int) - Method in class Grid
Determine whether a Square has a blockage
isEmpty() - Method in class DLDeque
Indicate whether or not the Deque is empty
isEmpty() - Method in interface Deque
Indicate whether or not the Deque is empty
isEmpty() - Method in class OpenList
Return true if this list is empty, false otherwise.
isEmpty() - Method in interface Queue
Indicate whether or not the Queue is empty
isEmpty() - Method in class SLQueue
Indicate whether or not the Queue is empty
isEmpty(OpenList) - Static method in class OpenList
Return true if the argument list is empty, false otherwise.
isMarked() - Method in class Square
Set if this Square has been visited.
isMarked(int, int) - Method in class Grid
Determine whether a Square has been visited during a search
itemStateChanged(ItemEvent) - Method in class BreadthFirstApplet.SampleChoiceListener
Act on a choice from a menu.
itemStateChanged(ItemEvent) - Method in class BreadthFirstApplet.DelayChoiceListener
 

L

lconcat(OpenList, String) - Static method in class OpenList
lconcat concatenates the elements of an OpenList, interspersing a designated String between elements.
lconcat(String) - Method in class OpenList
lconcat concatenates the elements of this OpenList, interspersing a designated String between elements.
length() - Method in class OpenList
Return the number of elements of this list.
length(OpenList) - Static method in class OpenList
Return the number of elements of the argument list.
list() - Static method in class OpenList
Return the list consisting of the argument objects, in this case the empty list.
list(Object) - Static method in class OpenList
Return the list consisting of the argument objects.
list(Object, Object) - Static method in class OpenList
Return the list consisting of the argument objects.
list(Object, Object, Object) - Static method in class OpenList
Return the list consisting of the argument objects.
list(Object, Object, Object, Object) - Static method in class OpenList
Return the list consisting of the argument objects.
list(Object, Object, Object, Object, Object) - Static method in class OpenList
Return the list consisting of the argument objects.
list(Object, Object, Object, Object, Object, Object) - Static method in class OpenList
Return the list consisting of the argument objects.
list(Object, Object, Object, Object, Object, Object, Object) - Static method in class OpenList
Return the list consisting of the argument objects.

M

main(String[]) - Static method in class OpenList
test program: exercises a variety of the defined methods, printing out results
main(String[]) - Static method in class OpenListEnumeration
Test OpenListEnmeration
mainBold - Variable in class BreadthFirstApplet
 
makeSamples() - Static method in class Sample
Generate a specific set of Samples.
map(Function1) - Method in class OpenList
Map a Function1 f over this OpenList.
map(Function1, OpenList) - Static method in class OpenList
Map a Function1 function object f over an OpenList L.
mappend(Function1, OpenList) - Static method in class OpenList
Map a Function1 function object f over an OpenList L, where the function is expected to produce a list for each object, then append the results together to get an overall list.
maybeClone(Object) - Static method in class Copier
Copies an Object, as far as that is possible.
member(Object) - Method in class OpenList
Return true if the first argument is a member (in the sense of being equals) of this OpenList
member(Object, OpenList) - Static method in class OpenList
Return true if the first argument is a member (in the sense of being equals) of the second argument list
mouseClicked(MouseEvent) - Method in class BaseApplet
These are required for implementing MouseListener.
mouseDragged(MouseEvent) - Method in class BaseApplet
 
mouseEntered(MouseEvent) - Method in class BaseApplet
 
mouseExited(MouseEvent) - Method in class BaseApplet
 
mouseMoved(MouseEvent) - Method in class BaseApplet
These are required for implementing MouseMotionListener.
mousePressed(MouseEvent) - Method in class BaseApplet
 
mouseReleased(MouseEvent) - Method in class BaseApplet
 
Multiplier - class Multiplier.
A Multiplier is a Function2 object that can be used to multiply a pair of Numbers.
Multiplier() - Constructor for class Multiplier
Create a Multiplier with a specific scale factor.
multiply(Object, Object) - Static method in class Multiplier
Multiply two Objects, both of which should be Numbers.
myThread - Variable in class BaseApplet
 

N

Next - Variable in class DLDeque.Dcell
reference to the next Dcell in the sequence
nextElement() - Method in class OpenListEnumeration
Get the next element in the enumeration
nil - Static variable in class OpenList
the one and only empty OpenList.
noArgs - Static variable in class Copier
 
nonEmpty() - Method in class OpenList
Return true if this list is non-empty, false otherwise.
nonEmpty(OpenList) - Static method in class OpenList
Return true if the argument list is non-empty, false otherwise.
noSuchElement - Variable in class OpenListEnumeration
Error message for NoSuchElementException
nth(int) - Method in class OpenList
Return the nth element of this list, starting with n = 0, 1, 2, ...
nth(int, OpenList) - Static method in class OpenList
Return the nth element of the second argument list, starting with n = 0, 1, 2, ...
nthException - Static variable in class OpenList
exception message for nth of a list

O

offScreen - Variable in class BaseApplet
 
OpenList - class OpenList.
OpenList is a type of uni-directional linked list that permits sharing of list tails.
OpenList(Object, OpenList) - Constructor for class OpenList
Construct an OpenList from its first and rest.
OpenListEnumeration - class OpenListEnumeration.
An OpenListEnumeration is a class implementing the java.util.Enumeration interface.
OpenListEnumeration(OpenList) - Constructor for class OpenListEnumeration
Create an OpenListEnumeration for the OpenList.
OpenListException - exception OpenListException.
An OpenListException is thrown when an attempt is made to do something illegal with an open list, such as taking first or rest of an empty list.
OpenListException(String) - Constructor for class OpenListException
Construct an OpenListException for a specified reason.

P

paint(Graphics) - Method in class BaseApplet
paint(Graphics) is is called by update(Graphics).
paintBuffer() - Method in class BaseApplet
Paint the off-screen buffer onto the screen
Pair - class Pair.
A Pair maintains a pair of int's, row and col.
Pair(int, int) - Constructor for class Pair
Create a Pair from row and Column.
parent - Variable in class Square
coordinates of the parent of the Square, during searching
prefix(int) - Method in class OpenList
Returns the first n elements of this OpenList.
prefix(int, OpenList) - Static method in class OpenList
Returns the first n elements of an OpenList.
Previous - Variable in class DLDeque.Dcell
reference to the previous Dcell in the sequence

Q

Queue - interface Queue.
A Queue is a repository for Objects maintained in first-in first-out order.
Quicksort - class Quicksort.
Quicksort is a setup for sorting an array of objects using the Quicksort algorithm.
Quicksort(Object[]) - Constructor for class Quicksort
Constructor for the Quicksort setup

R

range(Number, Number, Number) - Static method in class Ranger
Create an ascending list beginning with start, up to and including stop.
Ranger - class Ranger.
A Ranger is a Function1 object that produces a list of number from a start number up to including the argument number.
Ranger(Number, Number) - Constructor for class Ranger
Create a Ranger with a specific start and increment.
readLines(BufferedReader) - Static method in class OpenList
Read lines from a BufferedReader, each as a separate String.
reason - Variable in class OpenListException
The reason the exception was thrown.
reduce(Function2, Object) - Method in class OpenList
Reduce this OpenList using Function2 b and unit u.
reduce(Function2, Object, OpenList) - Static method in class OpenList
Reduce an OpenList using Function2 b and unit u.
remainder - Variable in class OpenListEnumeration
the remainder of the OpenList being enumerated
Rest - Variable in class OpenList
the rest of a list, defined to be an OpenList of all but the first cell
Rest - Variable in class SLQueue.Cell
the next Cell in the Queue
rest() - Method in class OpenList
Return the rest, i.e. all a list of all but the first of this non-empty OpenList.
rest(OpenList) - Static method in class OpenList
Return the rest, i.e. all a list of all but the first of the argument non-empty OpenList.
restException - Static variable in class OpenList
exception message for rest of empty list
reverse() - Method in class OpenList
Return a new list containing the elements of the argument this list in reverse order.
reverse(OpenList) - Static method in class OpenList
Return a new list containing the elements of the argument list in reverse order.
row - Variable in class Pair
 
rows - Variable in class Grid
the number of rows of the Grid
rows - Variable in class Sample
the number of rows in the grid for this sample
run() - Method in class BaseApplet
Run the applet by running its thread.

S

sacred(int, int) - Method in class Sample
Indicates coordinates of sacred squares, on which spam cannot be placed.
sample - Variable in class BreadthFirstApplet
 
Sample - class Sample.
A Sample maintains a grid size in rows and cols, a list of pairs, and a synthetic title, indicating the size and number of spam.
Sample(int, int) - Constructor for class Sample
Construct a Sample with a given number of rows and columns
sampleChoice - Variable in class BreadthFirstApplet
 
Scaler - class Scaler.
A Scaler is a Function1 object that can be used to scale a list of Numbers by a scale factor.
Scaler(Number) - Constructor for class Scaler
Create a Scaler with a specific scale factor.
second() - Method in class OpenList
Return the second element of this OpenList, assuming it has one.
second(OpenList) - Static method in class OpenList
Return the second element of the argument OpenList, assuming it has one.
secondException - Static variable in class OpenList
exception message for second of a list
set(int) - Method in class Square
Set the contents of the Square.
set(int, int, int) - Method in class Grid
Set the contents of a Square, after first checking that it is in range.
set(Pair, int) - Method in class Grid
Set the contents of a Square, after first checking that it is in range.
setBlank(int, int) - Method in class Grid
Make a Square of the grid blank.
setDelay(int) - Method in class BaseApplet
Set the current delay value in milliseconds.
setDelays(Choice, int[]) - Method in class BreadthFirstApplet
Set the delay values in a choice menu.
setInput(int) - Method in class BreadthFirstApplet
Set the input sample, create a new Grid, and initialize the search.
setList(Enumeration, int) - Method in class Grid
Set value on squares indexed by Pairs from an enumeration.
setParent(int, int, Pair) - Method in class Grid
Set coordinates of the parent of a Square
setParent(Pair) - Method in class Square
Set the parent of this Square
setParent(Pair, Pair) - Method in class Grid
Set coordinates of the parent of a Square
setSamples(Choice, Sample[]) - Method in class BreadthFirstApplet
Set the sample titles in a choice menu.
setToBody(Pair) - Method in class Grid
Set a Square of show a DESC body.
setToEnd(Pair) - Method in class Grid
Set a Square of show a DESC end.
sleep() - Method in class BaseApplet
Sleep for the amount specified in current delay.
sleep(int) - Method in class BaseApplet
Sleep for a specified number of milliseconds.
SLQueue - class SLQueue.
SLQueue is an implementation of Queue, a repository for Objects.
SLQueue.Cell - class SLQueue.Cell.
A Cell stores one Object in the Queue and points to the next newer Object if any.
SLQueue.Cell(Object, SLQueue.Cell) - Constructor for class SLQueue.Cell
construct a Cell
SLQueue() - Constructor for class SLQueue
Construct an empty SLQueue.
solidify(Enumeration) - Static method in class OpenList
Create an OpenList of the elements from an Enumeration.
sort(Comparator) - Method in class OpenList
Return a sorted version of this list, as determined by the Comparator, using the Quicksort algorithm
sort(Comparator) - Method in class Quicksort
Sort the array in place using the argument comparator
sort(int, int, Comparator) - Method in class Quicksort
Sort the array elements at indices from low to high, inclusive.
SPAM - Static variable in class Grid
value for the spam character
spamColor - Static variable in class AppletGrid
Color used in applet to draw spam
spamEnumeration() - Method in class Sample
Get an enumeration of the SpamList of this Sample.
spamList - Variable in class Sample
list of pairs indicating coordinates of spam in this sample
square - Variable in class Grid
the Squares of the Grid
Square - class Square.
a single Square of the grid
Square(int) - Constructor for class Square
Construct a square from specified contents.
start - Variable in class Ranger
The starting number in the range to be produced.
start() - Method in class BaseApplet
Start the applet.
step() - Method in class BaseApplet
Over-ride this in the derived class.
step() - Method in class BreadthFirstApplet
Do a single step of the breadth-first search.
stepsString - Static variable in class BreadthFirstApplet
 
stepsTaken - Variable in class BreadthFirstApplet
 
swap(int, int) - Method in class Quicksort
swap(i, j) interchanges the values in a[i] and a[j]

T

tail - Variable in class SLQueue
the Cell containing the most recent Object inserted
third() - Method in class OpenList
Return the third element of this OpenList, assuming it has one.
third(OpenList) - Static method in class OpenList
Return the third element of the argument OpenList, assuming it has one.
thirdException - Static variable in class OpenList
exception message for third of a list
toArray() - Method in class OpenList
Return an array of the Objects in this OpenList.
toArray(OpenList) - Static method in class OpenList
Return an array of the Objects in the argument OpenList.
toString() - Method in class Grid
Return a String representation of this Grid.
toString() - Method in class OpenList
Convert this OpenList to a String, using default punctuation.
toString() - Method in class OpenListException
Return a printable version of this exception, which states the reason the exception was thrown.
toString() - Method in class Pair
Provide a String representation of this Pair.
toString() - Method in class Sample
Return a string representation of this Sample, which is defined to be the same as the title.
toString(String, String, String) - Method in class OpenList
Convert this OpenList to a String, using the arguments as punctuation.

U

update(Graphics) - Method in class BaseApplet
update is implicitly called by repaint() It calls paint(Graphics).

W

wherePart - Static variable in class OpenList
part of exception message for nth of a list

X

xGridOffset - Variable in class BreadthFirstApplet
 
xString - Variable in class BreadthFirstApplet
 

Y

yGridOffset - Variable in class BreadthFirstApplet
 
yString - Variable in class BreadthFirstApplet
 

A B C D E F G H I L M N O P Q R S T U W X Y