Package io.datarouter.bytes
Class LongArray
java.lang.Object
io.datarouter.bytes.LongArray
- All Implemented Interfaces:
Iterable<Long>,Collection<Long>,List<Long>,RandomAccess
public class LongArray extends Object implements List<Long>, RandomAccess
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLongArray.LongArrayIterator -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidadd(int index, long value)voidadd(int index, Long value)booleanadd(long value)booleanadd(Long value)booleanaddAll(int firstIndex, Collection<? extends Long> values)booleanaddAll(Collection<? extends Long> values)voidclear()booleancontains(Object obj)booleancontainsAll(Collection<?> objects)LongArraycopyDedupeConsecutive()Longget(int index)longgetPrimitive(int index)long[]getPrimitiveArray()intindexOf(Object obj)booleanisEmpty()Iterator<Long>iterator()intlastIndexOf(Object obj)ListIterator<Long>listIterator()ListIterator<Long>listIterator(int startIndex)Longremove(int index)booleanremove(Object obj)booleanremoveAll(Collection<?> objects)booleanretainAll(Collection<?> objects)Longset(int index, Long value)protected voidshrinkIfNecessary()intsize()LongArraysortInPlace()List<Long>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] wrapperArray)StringtoString()LongArraytrimmedCopy()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
LongArray
public LongArray() -
LongArray
public LongArray(int initialCapacity) -
LongArray
public LongArray(long[] toWrap) -
LongArray
-
-
Method Details
-
shrinkIfNecessary
protected void shrinkIfNecessary() -
add
-
add
public void add(int index, long value) -
add
-
add
public boolean add(long value) -
addAll
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<Long>- Specified by:
containsAllin interfaceList<Long>
-
get
-
getPrimitive
public long getPrimitive(int index) -
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<Long>
-
listIterator
- Specified by:
listIteratorin interfaceList<Long>
-
listIterator
- Specified by:
listIteratorin interfaceList<Long>
-
remove
-
remove
-
removeAll
-
retainAll
-
set
-
size
public int size() -
subList
-
toArray
-
toArray
public <T> T[] toArray(T[] wrapperArray) -
toString
-
getPrimitiveArray
public long[] getPrimitiveArray() -
trimmedCopy
-
sortInPlace
-
copyDedupeConsecutive
-