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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
get
(int i) Returns the object associated with a given number.int
int
iterator()
static <T extends Comparable<? super T>>
ArrayIndex<T>natural
(T... items) int
size()
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, wait
Methods inherited from interface eu.bandm.tools.ops.Index
comparator, enumerate, isEmpty
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ArrayIndex
-
-
Method Details
-
natural
-
iterator
-
size
public int size()Description copied from interface:Index
Returns the number of objects in this index. This number is nonnegative. -
contains
-
containsUnchecked
- Specified by:
containsUnchecked
in interfaceIndex<T>
-
indexOf
-
indexOfUnchecked
- Specified by:
indexOfUnchecked
in interfaceIndex<T>
-
get
Description copied from interface:Index
Returns the object associated with a given number.
-