Class SetIndex<T>

java.lang.Object
eu.bandm.tools.ops.SetIndex<T>
All Implemented Interfaces:
Index<T>, Serializable, Iterable<T>

public class SetIndex<T> extends Object implements Index<T>
DOCME
See Also:
  • Constructor Details

    • SetIndex

      public SetIndex()
    • SetIndex

      public SetIndex(Set<? extends T> items)
  • Method Details

    • add

      public int add(T item)
    • size

      public int size()
      Description copied from interface: Index
      Returns the number of objects in this index. This number is nonnegative.
      Specified by:
      size in interface Index<T>
      Returns:
      the number of objects in this index.
    • get

      public T get(int i)
      Description copied from interface: Index
      Returns the object associated with a given number.
      Specified by:
      get in interface Index<T>
      Returns:
      the object associated with a given number.
    • indexOf

      public int indexOf(T item)
      Specified by:
      indexOf in interface Index<T>
    • contains

      public boolean contains(T item)
      Specified by:
      contains in interface Index<T>
    • indexOfUnchecked

      public int indexOfUnchecked(Object item)
      Specified by:
      indexOfUnchecked in interface Index<T>
    • containsUnchecked

      public boolean containsUnchecked(Object item)
      Specified by:
      containsUnchecked in interface Index<T>
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>