Package com.mks.api
Class SelectionList
- java.lang.Object
-
- com.mks.api.SelectionList
-
public class SelectionList extends java.lang.Object
Class used to contain a list ofString
objects representing the selection to pass to theCommand
to be executed.Duplicate entries are allowed by this class.
Examples of a selection include member names for the
si co
command, item IDs forim viewissue
, a change package (or change package ID) forim viewcp
.
-
-
Constructor Summary
Constructors Constructor Description SelectionList()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SelectionList selList)
Adds aSelectionList
to this list.void
add(java.lang.String selection)
Adds aString
selection element to the list.void
clear()
Resets the contents of the list.boolean
equals(java.lang.Object o)
Two SelectionLists are equal if all the elements are equal (order counts).java.lang.String
getSelection(int idx)
Retrieves aSelection
at the specified index, ornull
if the given index position is out of range.java.util.Iterator
getSelections()
Retrieves anIterator
over the list.int
hashCode()
int
size()
Retrieves the size of the list.
-
-
-
Method Detail
-
add
public void add(java.lang.String selection)
Adds aString
selection element to the list.- Parameters:
selection
- TheSelection
to add to the list.
-
add
public void add(SelectionList selList)
Adds aSelectionList
to this list.- Parameters:
selList
- TheSelectionList
to add to this list.
-
getSelections
public java.util.Iterator getSelections()
Retrieves anIterator
over the list.- Returns:
- An
Iterator
over the list ofString
selection elements.
-
getSelection
public java.lang.String getSelection(int idx)
Retrieves aSelection
at the specified index, ornull
if the given index position is out of range.- Parameters:
idx
- The index of theSelection
to retrieve.- Returns:
- The
Selection
at the given index, ornull
if the index is out of range. - Throws:
java.lang.ArrayIndexOutOfBoundsException
- Ifidx
< 0 oridx
>=size()
.
-
size
public int size()
Retrieves the size of the list.- Returns:
- The size of the list.
-
clear
public void clear()
Resets the contents of the list.
-
equals
public boolean equals(java.lang.Object o)
Two SelectionLists are equal if all the elements are equal (order counts).- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-