Package com.sun.interview
Class Checklist
java.lang.Object
com.sun.interview.Checklist
A Checklist is a sorted collection of messages,
for the purpose of providing a list of actions that must
be performed in association with a completed interview.
Messages are grouped into sections, which are sorted
alphabetically; within a section, messages are stored
in the order they are added.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An Item contains a message to appear in a checklist. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Checklist.Item item) Add a new item to this checklist.String[]
getSectionMessages
(String sectionName) Get the messages in a specific section of this checklist.String[]
Get the names of the sections for which entries have been added to the checklist.boolean
isEmpty()
Determine whether or not any items have been added to the checklist.
-
Constructor Details
-
Checklist
public Checklist()Create an empty checklist.
-
-
Method Details
-
getSectionNames
Get the names of the sections for which entries have been added to the checklist.- Returns:
- an array containing the names of the sections for which entries have been added to the checklist
-
getSectionMessages
Get the messages in a specific section of this checklist.- Parameters:
sectionName
- the name of the section for which the iterator should return messages- Returns:
- an array containing the messages in a specific section of this checklist, or null if no messages have been added for the given section
-
add
Add a new item to this checklist.- Parameters:
item
- The Item to be added
-
isEmpty
public boolean isEmpty()Determine whether or not any items have been added to the checklist.- Returns:
- true if the checklist has no entries, and false otherwise.
-