Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
B
C
D
G
H
L
M
N
O
P
R
S
T
V
B
Brewer
- Class in
<Unnamed>
A consumer of grain.
Brewer()
- Constructor for class
Brewer
C
change(Grain, int)
- Method in class
Order
Changes the mount of "g" by "diff".
copy()
- Method in class
Order
Returns a copy of this Order.
D
debug(Object)
- Static method in class
P2
If the debugging flag is on, prints a message, preceded by the name of the current thread.
debug(String, Object...)
- Static method in class
P2
If the debugging flag is on, prints a message, preceded by the name of the current thread.
deliver(int)
- Method in interface
Trader
Accepts a delivery from the supplier.
deliver(int)
- Method in class
TraderImpl
Accepts more grain from the supplier.
G
get(Grain)
- Method in class
Order
Gets the amount of "g" in this order.
get(Order)
- Method in interface
Trader
A request from a brewer.
get(Order)
- Method in class
TraderImpl
A purchase request from a Brewer.
getAmountOnHand()
- Method in interface
Trader
Reports on the total amount of resources held by this Trader.
getAmountOnHand()
- Method in class
TraderImpl
Reports on the total amount of resources held by this Trader.
getConsumption()
- Method in class
Brewer
Reports on the total amount consumed thus far.
GetOpt
- Class in
<Unnamed>
Java version of GNU getopt.
GetOpt(String, String[], String, GetOpt.LongOption[], boolean)
- Constructor for class
GetOpt
Create a new option parser.
GetOpt(String, String[], String)
- Constructor for class
GetOpt
Create a new option parser.
GetOpt(String, String[], String, GetOpt.LongOption[])
- Constructor for class
GetOpt
Create a new option parser.
GetOpt.LongOption
- Class in
<Unnamed>
A record used in a table of option descriptions passed to a constructor of GetOpt.
GetOpt.LongOption(String, int, char)
- Constructor for class
GetOpt.LongOption
Create a LongOption from its components.
getProduction()
- Method in class
Supplier
Indicates the amount of each grain delivered.
Grain
- Enum in
<Unnamed>
Names of grain types.
H
hasArg
- Variable in class
GetOpt.LongOption
A flag, one of
GetOpt.NO_ARG
,
GetOpt.REQ_ARG
, or
GetOpt.OPT_ARG
.
L
longind
- Variable in class
GetOpt
Index in longopts of a long-named option found.
M
main(String[])
- Static method in class
GetOpt
Main program for testing.
main(String[])
- Static method in class
P2
Main program for project 2.
N
name
- Variable in class
GetOpt.LongOption
The option name (for example, "color").
nextOpt()
- Method in class
GetOpt
Return the next option.
NO_ARG
- Static variable in class
GetOpt
A value for LongOption.has Arg meaning "option has no argument".
O
OPT_ARG
- Static variable in class
GetOpt
A value for LongOption.has Arg meaning "option has an optional argument".
optarg
- Variable in class
GetOpt
For communication from nextOpt() to the caller.
opterr
- Variable in class
GetOpt
If set to false, do not print messages to System.err for unrecognized options.
optind
- Variable in class
GetOpt
Index in argv of the next element to be scanned.
optopt
- Variable in class
GetOpt
Set to an option character which was unrecognized.
Order
- Class in
<Unnamed>
An order (mapping from commdities to integers).
Order()
- Constructor for class
Order
Creates a new Order with all amounts zero.
P
P2
- Class in
<Unnamed>
The Project 2 main class.
P2()
- Constructor for class
P2
R
randInt(int)
- Static method in class
P2
Utility to generate a random non-negative integer less than max.
randInt(int, int)
- Static method in class
P2
Utility to generate a random integer between min and max (inclusive).
REQ_ARG
- Static variable in class
GetOpt
A value for LongOption.has Arg meaning "option has a required argument".
run()
- Method in class
Brewer
Main loop.
run()
- Method in class
Supplier
Main loop.
S
set(Grain, int)
- Method in class
Order
Sets the amount of "g" to "n".
setVerbose(boolean)
- Static method in class
P2
Turns debugging output on or off.
specialist(Grain)
- Static method in class
P2
Returns the specialist for a given grain.
Supplier
- Class in
<Unnamed>
A supplier of grains.
Supplier(int)
- Constructor for class
Supplier
Creates a new Supplier.
swap(Grain, int)
- Method in interface
Trader
Responds to a swap request from another Trader.
swap(Grain, int)
- Method in class
TraderImpl
Responds to a swap request from another trader.
T
toString()
- Method in class
GetOpt.LongOption
Convert this option into a printable string.
toString()
- Method in class
Order
Returns a readable version of this order.
Trader
- Interface in
<Unnamed>
Interface to be implmented by TraderImplementation.
TraderImpl
- Class in
<Unnamed>
Implementation of a trader.
TraderImpl(Grain)
- Constructor for class
TraderImpl
Creates a new Trader.
V
val
- Variable in class
GetOpt.LongOption
The equivalent short (one-char) option name (for example 'c').
valueOf(String)
- Static method in enum
Grain
Returns the enum constant of this type with the specified name.
values()
- Static method in enum
Grain
Returns an array containing the constants of this enum type, in the order they're declared.
B
C
D
G
H
L
M
N
O
P
R
S
T
V
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes