Package com.sun.interview
Class Checklist
- java.lang.Object
-
- com.sun.interview.Checklist
-
public class Checklist extends java.lang.Object
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 Classes Modifier and Type Class Description static class
Checklist.Item
An Item contains a message to appear in a checklist.
-
Constructor Summary
Constructors Constructor Description Checklist()
Create an empty checklist.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Checklist.Item item)
Add a new item to this checklist.java.lang.String[]
getSectionMessages(java.lang.String sectionName)
Get the messages in a specific section of this checklist.java.lang.String[]
getSectionNames()
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.
-
-
-
Method Detail
-
getSectionNames
public java.lang.String[] 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
public java.lang.String[] getSectionMessages(java.lang.String sectionName)
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
public void add(Checklist.Item item)
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.
-
-