Package eu.bandm.tools.ops
Class ArrayIndex<T>
java.lang.Object
eu.bandm.tools.ops.ArrayIndex<T>
- All Implemented Interfaces:
Index<T>,Serializable,Iterable<T>
Sorted list of instances of T for indexed representation, realized internally by
an array.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanget(int i) Returns the object associated with a given number.intintiterator()static <T extends Comparable<? super T>>
ArrayIndex<T> natural(T... items) intsize()Returns the number of objects in this index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.tools.ops.Index
comparator, enumerate, isEmptyMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ArrayIndex
-
-
Method Details
-
natural
-
iterator
-
size
public int size()Description copied from interface:IndexReturns the number of objects in this index. This number is nonnegative. -
contains
-
containsUnchecked
- Specified by:
containsUncheckedin interfaceIndex<T>
-
indexOf
-
indexOfUnchecked
- Specified by:
indexOfUncheckedin interfaceIndex<T>
-
get
Description copied from interface:IndexReturns the object associated with a given number.
-