Class SparseRangeArrayList<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
ubic.gemma.core.datastructure.sparse.SparseRangeArrayList<T>
- All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, SequencedCollection<T>, SparseList<T>
A sparse range array is a data structure that efficiently stores arrays of repeated elements by encoding their
starting offsets.
For example, a sequence of characters AAAAABBBBCC is stored as ABC with the following offsets
0, 5, 9.
- Author:
- poirigui
- See Also:
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty sparse range array.SparseRangeArrayList(Collection<T> collection) SparseRangeArrayList(List<T> array, int[] offsets, int numberOfElements) -
Method Summary
Methods inherited from class AbstractList
add, add, addAll, clear, hashCode, iterator, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, getFirst, getLast, hashCode, isEmpty, iterator, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
SparseRangeArrayList
-
SparseRangeArrayList
-
SparseRangeArrayList
public SparseRangeArrayList()Create an empty sparse range array.
-
-
Method Details
-
get
-
storageSize
public int storageSize()Description copied from interface:SparseListThe number of elements actually stored.- Specified by:
storageSizein interfaceSparseList<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>- Overrides:
lastIndexOfin classAbstractList<T>
-
equals
- Specified by:
equalsin interfaceCollection<T>- Specified by:
equalsin interfaceList<T>- Overrides:
equalsin classAbstractList<T>
-