Skip navigation links
A D G I M O P R S T U 

A

addOption(String) - Method in class Menu
Adds an option to the menu.

D

delay() - Method in class Stopwatch
Inserts a short delay.
delay(int) - Method in class Stopwatch
Inserts a delay of the given size.
display() - Method in class Menu
Displays the menu title and options, with a blank line between the title and the options.
display() - Method in class OpeningScreen
Displays the current OpeningScreen object.
display() - Method in class OperationCounter
Displays the summary count of operations performed, but only for non-zero counts.
display(boolean) - Method in class OperationCounter
Displays the summary count of operations performed, optionally including zero counts.
displayItem(String) - Method in class TextItems
Displays the item having the title supplied as parameter, or an error message if no item with that title is found.

G

getChoice(String, int) - Method in class Menu
Prompts the user to enter a menu choice and then reads the choice entered by the user at the keyboard.
getChoice() - Method in class Menu
Same as the two-parameter version, except it uses a default prompt and a default maximum number of tries.
getChoice(String) - Method in class Menu
Same as the two-parameter version, except it uses the input prompt and the default maximum number of tries, which is 3.
getChoice(int) - Method in class Menu
Same as the two-parameter version, except it uses the default prompt and the maximum number of tries input.
getHours() - Method in class Stopwatch
Returns the elapsed time in hours, as recorded at the last call to stop().
getMilliSeconds() - Method in class Stopwatch
Returns the elapsed time in milliseconds, as recorded at the last call to stop().
getMinutes() - Method in class Stopwatch
Returns the elapsed time in minutes, as recorded at the last call to stop().
getNameOfOther() - Method in class OperationCounter
Gets the name of the other operation.
getNumberOfAssignments() - Method in class OperationCounter
Gets the number of assignments counted
getNumberOfComparisons() - Method in class OperationCounter
Gets the number of comparisons counted
getNumberOfExchanges() - Method in class OperationCounter
Gets the number of exchanges counted
getNumberOfOther() - Method in class OperationCounter
Gets the number of other operations counted
getSeconds() - Method in class Stopwatch
Returns the elapsed time in seconds, as recorded at the last call to stop().
getTicks() - Method in class Stopwatch
Returns the elapsed time in clock ticks, as recorded at the last call to stop().

I

incrementAssignments() - Method in class OperationCounter
Adds 1 to the number of assignments.
incrementAssignments(long) - Method in class OperationCounter
Adds a fixed positive integer amount to the number of assignments.
incrementComparisons() - Method in class OperationCounter
Adds 1 to the number of comparisons.
incrementComparisons(long) - Method in class OperationCounter
Adds a fixed positive integer amount to the number of comparisons.
incrementExchanges() - Method in class OperationCounter
Adds 1 to the number of exchanges.
incrementExchanges(long) - Method in class OperationCounter
Adds a fixed positive integer amount to the number of exchanges.
incrementOther() - Method in class OperationCounter
Adds 1 to the number of other operations.
incrementOther(long) - Method in class OperationCounter
Adds a fixed positive integer amount to the number of "other" operations.

M

main(String[]) - Static method in class OperationCounter
 
main(String[]) - Static method in class Stopwatch
 
main(String[]) - Static method in class TextItems
 
main(String[]) - Static method in class Utils
A test driver main() method for this class.
Menu - Class in <Unnamed>
A menu class for console programs.
Menu() - Constructor for class Menu
Default constructor.
Menu(String) - Constructor for class Menu
Constructor with title.

O

OpeningScreen - Class in <Unnamed>
A class for displaying three lines of information at various positions on the screen (the standard output), which may be used as a display of the "opening screen" of any console program.
OpeningScreen() - Constructor for class OpeningScreen
Creates a default OpeningScreen object containing three lines of text output that identify the programmer and the submission.
OpeningScreen(String, String, String) - Constructor for class OpeningScreen
Creates an OpeningScreen object with client-supplied three lines of text output to be displayed.
OpeningScreen(String, String, String, int) - Constructor for class OpeningScreen
Creates an OpeningScreen object with client-supplied three lines of text output to be displayed, as well as a client-supplied indentation level.
OpeningScreen(String, String, String, int, int, int) - Constructor for class OpeningScreen
Creates an OpeningScreen object with client-supplied three lines of text output to be displayed, as well as a client-supplied number of spaces to indent, in addition to a client-supplied number of blank lines before and after the three lines of output.
OperationCounter - Class in <Unnamed>
Specification for the OperationCounter class.
OperationCounter() - Constructor for class OperationCounter
Default constructor Creates an OperationCounter object with all counts set to 0 and the name of the other operation set to "No Other Op".

P

pause(int, String, int) - Static method in class Utils
Causes the program to pause and wait for the user to press Enter to continue, with default values for the indentation level, the message supplying any additional information to the user, and the pause number.
pause(int, String) - Static method in class Utils
The version in which the "Press Enter to continue ...
pause(int) - Static method in class Utils
The version in which the "Press Enter to continue ...
pause() - Static method in class Utils
The default version, with no indentation, no pause number, no special message, so only the "Press Enter to continue ...

R

reset() - Method in class OperationCounter
Resets all the counters of this OperationCounter to zero and the name of the "other" operation to "No Other Op".

S

setNameOfOther(String) - Method in class OperationCounter
Sets the name of the other operation.
setTitle(String) - Method in class Menu
Sets (or resets) the title of an already existing menu.
start() - Method in class Stopwatch
Resets this Stopwatch object to the current time.
stop() - Method in class Stopwatch
Records the time elapsed since creation/the last start.
Stopwatch - Class in <Unnamed>
Specification for the Stopwatch class.
Stopwatch() - Constructor for class Stopwatch
Default constructor Creates a new Stopwatch object

T

TextItems - Class in <Unnamed>
A class for handling on-line help and other text messages that the programmer does not wish to "hard-wire" into the code of a console program.
TextItems() - Constructor for class TextItems
Default constructor.
TextItems(String) - Constructor for class TextItems
Constructor that takes the name of a file of text items as input.
TextItems(InputStream) - Constructor for class TextItems
Constructor that takes as input an object of type InputStream that has been associated with a file of text items.

U

userSaysYes(String) - Static method in class Utils
Gets the user's yes-or-no answer to a single question.
Utils - Class in <Unnamed>
A collection of public static utility methods.
Utils() - Constructor for class Utils
 
A D G I M O P R S T U 
Skip navigation links