Class BasePrimitiveList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
io.datarouter.bytes.primitivelist.BasePrimitiveList<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,RandomAccess
- Direct Known Subclasses:
PrimitiveFloatList,PrimitiveIntList,PrimitiveLongList
public abstract class BasePrimitiveList<T> extends AbstractList<T> implements RandomAccess
-
Field Summary
Fields Modifier and Type Field Description protected intfromprotected static intNOT_FOUND_INDEXprotected inttoFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors Constructor Description BasePrimitiveList(int from, int to) -
Method Summary
Modifier and Type Method Description booleancontains(Object obj)booleanequals(Object object)Tget(int index)inthashCode()intindexOf(Object obj)protected voidinitFromCollection(Collection<T> values)intlastIndexOf(Object obj)Tset(int index, T value)intsize()List<T>subList(int fromIndex, int toIndex)Methods inherited from class java.util.AbstractList
add, add, addAll, clear, iterator, listIterator, listIterator, remove, removeRangeMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
NOT_FOUND_INDEX
protected static final int NOT_FOUND_INDEX- See Also:
- Constant Field Values
-
from
protected final int from -
to
protected final int to
-
-
Constructor Details
-
BasePrimitiveList
public BasePrimitiveList(int from, int to)
-
-
Method Details
-
initFromCollection
-
contains
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceList<T>- Overrides:
containsin classAbstractCollection<T>
-
equals
- Specified by:
equalsin interfaceCollection<T>- Specified by:
equalsin interfaceList<T>- Overrides:
equalsin classAbstractList<T>
-
get
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<T>- Specified by:
hashCodein interfaceList<T>- Overrides:
hashCodein classAbstractList<T>
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>- Overrides:
lastIndexOfin classAbstractList<T>
-
set
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-
subList
-