Interface PositiveIntSet

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean add​(int key)  
      void bulkAddTo​(IntVector v)
      add all elements in this set to the IntVector v as a bulk operation
      void clear()
      remove all members of the set
      boolean contains​(int key)  
      int find​(int element)  
      int get​(int position)
      For FSBagIndex low level iterator use DOESN"T WORK WITH INCREMENTING position VALUES
      boolean isValid​(int position)
      For FSBagIndex low level iterator use
      IntListIterator iterator()  
      int moveToFirst()
      For FSBagIndex low level iterator use
      int moveToLast()
      For FSBagIndex low level iterator use
      int moveToNext​(int position)
      For FSBagIndex low level iterator use
      int moveToPrevious​(int position)
      For FSBagIndex low level iterator use
      boolean remove​(int key)  
      int size()  
      int[] toIntArray()  
    • Method Detail

      • clear

        void clear()
        remove all members of the set
      • contains

        boolean contains​(int key)
        Parameters:
        key - -
        Returns:
        true if key is in the set
      • add

        boolean add​(int key)
        Parameters:
        key - -
        Returns:
        true if this set did not already contain the specified element
      • bulkAddTo

        void bulkAddTo​(IntVector v)
        add all elements in this set to the IntVector v as a bulk operation
        Parameters:
        v - - to be added to
      • remove

        boolean remove​(int key)
        Parameters:
        key - -
        Returns:
        true if the set had this element before the remove
      • size

        int size()
        Returns:
        number of elements in the set
      • toIntArray

        int[] toIntArray()
        Returns:
        the set as an arbitrarily ordered int array
      • iterator

        IntListIterator iterator()
        Returns:
        an iterator (may be ordered or unordered) over the members of the set
      • find

        int find​(int element)
        Parameters:
        element - an item which may be in the set
        Returns:
        -1 if the item is not in the set, or a position value that can be used with iterators to start at that item.
      • get

        int get​(int position)
        For FSBagIndex low level iterator use DOESN"T WORK WITH INCREMENTING position VALUES
        Parameters:
        position - - get the element at this position. This is for iterator use only, and is not related to any key
        Returns:
        the element
      • moveToFirst

        int moveToFirst()
        For FSBagIndex low level iterator use
        Returns:
        the position of the first element, or -1;
      • moveToLast

        int moveToLast()
        For FSBagIndex low level iterator use
        Returns:
        the position of the last element, or -1;
      • moveToNext

        int moveToNext​(int position)
        For FSBagIndex low level iterator use
        Parameters:
        position - -
        Returns:
        the position of the next element, or -1;
      • moveToPrevious

        int moveToPrevious​(int position)
        For FSBagIndex low level iterator use
        Parameters:
        position - -
        Returns:
        the position of the next element, or -1;
      • isValid

        boolean isValid​(int position)
        For FSBagIndex low level iterator use
        Parameters:
        position - -
        Returns:
        true if the position is between the first and last element inclusive.