Package com.mks.api

Class SelectionList


  • public class SelectionList
    extends java.lang.Object
    Class used to contain a list of String objects representing the selection to pass to the Command to be executed.

    Duplicate entries are allowed by this class.

    Examples of a selection include member names for the si co command, item IDs for im viewissue, a change package (or change package ID) for im 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 a SelectionList to this list.
      void add​(java.lang.String selection)
      Adds a String 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 a Selection at the specified index, or null if the given index position is out of range.
      java.util.Iterator getSelections()
      Retrieves an Iterator over the list.
      int hashCode()  
      int size()
      Retrieves the size of the list.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SelectionList

        public SelectionList()
        Default constructor.
    • Method Detail

      • add

        public void add​(java.lang.String selection)
        Adds a String selection element to the list.
        Parameters:
        selection - The Selection to add to the list.
      • add

        public void add​(SelectionList selList)
        Adds a SelectionList to this list.
        Parameters:
        selList - The SelectionList to add to this list.
      • getSelections

        public java.util.Iterator getSelections()
        Retrieves an Iterator over the list.
        Returns:
        An Iterator over the list of String selection elements.
      • getSelection

        public java.lang.String getSelection​(int idx)
        Retrieves a Selection at the specified index, or null if the given index position is out of range.
        Parameters:
        idx - The index of the Selection to retrieve.
        Returns:
        The Selection at the given index, or null if the index is out of range.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If idx < 0 or idx >= 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 class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object