Package gnu.trove.list.linked
Class TByteLinkedList
java.lang.Object
gnu.trove.list.linked.TByteLinkedList
- All Implemented Interfaces:
gnu.trove.list.TByteList,gnu.trove.TByteCollection,Externalizable,Serializable
A resizable, double linked list of byte primitives.
- See Also:
-
Field Summary
Fields inherited from interface gnu.trove.TByteCollection
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionTByteLinkedList(byte no_entry_value) TByteLinkedList(gnu.trove.list.TByteList list) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(byte val) voidadd(byte[] vals) voidadd(byte[] vals, int offset, int length) booleanaddAll(byte[] array) booleanaddAll(gnu.trove.TByteCollection collection) booleanaddAll(Collection<? extends Byte> collection) intbinarySearch(byte value) intbinarySearch(byte value, int fromIndex, int toIndex) voidclear()booleancontains(byte value) booleancontainsAll(byte[] array) booleancontainsAll(gnu.trove.TByteCollection collection) booleancontainsAll(Collection<?> collection) booleanvoidfill(byte val) voidfill(int fromIndex, int toIndex, byte val) booleanforEach(gnu.trove.procedure.TByteProcedure procedure) booleanforEachDescending(gnu.trove.procedure.TByteProcedure procedure) byteget(int offset) gnu.trove.list.linked.TByteLinkedList.TByteLinkgetLinkAt(int offset) Returns the link at the given offset.bytegnu.trove.list.TByteListgrep(gnu.trove.procedure.TByteProcedure condition) inthashCode()intindexOf(byte value) intindexOf(int offset, byte value) voidinsert(int offset, byte value) voidinsert(int offset, byte[] values) voidinsert(int offset, byte[] values, int valOffset, int len) gnu.trove.list.TByteListinverseGrep(gnu.trove.procedure.TByteProcedure condition) booleanisEmpty()gnu.trove.iterator.TByteIteratoriterator()intlastIndexOf(byte value) intlastIndexOf(int offset, byte value) bytemax()bytemin()voidbooleanremove(byte value) voidremove(int offset, int length) booleanremoveAll(byte[] array) booleanremoveAll(gnu.trove.TByteCollection collection) booleanremoveAll(Collection<?> collection) byteremoveAt(int offset) bytereplace(int offset, byte val) booleanretainAll(byte[] array) booleanretainAll(gnu.trove.TByteCollection collection) booleanretainAll(Collection<?> collection) voidreverse()voidreverse(int from, int to) byteset(int offset, byte val) voidset(int offset, byte[] values) voidset(int offset, byte[] values, int valOffset, int length) voidintsize()voidsort()voidsort(int fromIndex, int toIndex) gnu.trove.list.TByteListsubList(int begin, int end) bytesum()byte[]toArray()byte[]toArray(byte[] dest) byte[]toArray(byte[] dest, int offset, int len) byte[]toArray(byte[] dest, int source_pos, int dest_pos, int len) byte[]toArray(int offset, int len) toString()voidtransformValues(gnu.trove.function.TByteFunction function) void
-
Constructor Details
-
TByteLinkedList
public TByteLinkedList() -
TByteLinkedList
public TByteLinkedList(byte no_entry_value) -
TByteLinkedList
public TByteLinkedList(gnu.trove.list.TByteList list)
-
-
Method Details
-
getNoEntryValue
public byte getNoEntryValue()- Specified by:
getNoEntryValuein interfacegnu.trove.TByteCollection- Specified by:
getNoEntryValuein interfacegnu.trove.list.TByteList
-
size
public int size()- Specified by:
sizein interfacegnu.trove.TByteCollection- Specified by:
sizein interfacegnu.trove.list.TByteList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacegnu.trove.TByteCollection- Specified by:
isEmptyin interfacegnu.trove.list.TByteList
-
add
public boolean add(byte val) - Specified by:
addin interfacegnu.trove.TByteCollection- Specified by:
addin interfacegnu.trove.list.TByteList
-
add
public void add(byte[] vals) - Specified by:
addin interfacegnu.trove.list.TByteList
-
add
public void add(byte[] vals, int offset, int length) - Specified by:
addin interfacegnu.trove.list.TByteList
-
insert
public void insert(int offset, byte value) - Specified by:
insertin interfacegnu.trove.list.TByteList
-
insert
public void insert(int offset, byte[] values) - Specified by:
insertin interfacegnu.trove.list.TByteList
-
insert
public void insert(int offset, byte[] values, int valOffset, int len) - Specified by:
insertin interfacegnu.trove.list.TByteList
-
get
public byte get(int offset) - Specified by:
getin interfacegnu.trove.list.TByteList
-
getLinkAt
public gnu.trove.list.linked.TByteLinkedList.TByteLink getLinkAt(int offset) Returns the link at the given offset.
A simple bisection criteria is used to keep the worst case complexity equal to O(n/2) where n = size(). Simply start from head of list or tail depending on offset and list size.
- Parameters:
offset- of the link- Returns:
- link or null if non-existent
-
set
public byte set(int offset, byte val) - Specified by:
setin interfacegnu.trove.list.TByteList
-
set
public void set(int offset, byte[] values) - Specified by:
setin interfacegnu.trove.list.TByteList
-
set
public void set(int offset, byte[] values, int valOffset, int length) - Specified by:
setin interfacegnu.trove.list.TByteList
-
replace
public byte replace(int offset, byte val) - Specified by:
replacein interfacegnu.trove.list.TByteList
-
clear
public void clear()- Specified by:
clearin interfacegnu.trove.TByteCollection- Specified by:
clearin interfacegnu.trove.list.TByteList
-
remove
public boolean remove(byte value) - Specified by:
removein interfacegnu.trove.TByteCollection- Specified by:
removein interfacegnu.trove.list.TByteList
-
containsAll
- Specified by:
containsAllin interfacegnu.trove.TByteCollection
-
containsAll
public boolean containsAll(gnu.trove.TByteCollection collection) - Specified by:
containsAllin interfacegnu.trove.TByteCollection
-
containsAll
public boolean containsAll(byte[] array) - Specified by:
containsAllin interfacegnu.trove.TByteCollection
-
addAll
- Specified by:
addAllin interfacegnu.trove.TByteCollection
-
addAll
public boolean addAll(gnu.trove.TByteCollection collection) - Specified by:
addAllin interfacegnu.trove.TByteCollection
-
addAll
public boolean addAll(byte[] array) - Specified by:
addAllin interfacegnu.trove.TByteCollection
-
retainAll
- Specified by:
retainAllin interfacegnu.trove.TByteCollection
-
retainAll
public boolean retainAll(gnu.trove.TByteCollection collection) - Specified by:
retainAllin interfacegnu.trove.TByteCollection
-
retainAll
public boolean retainAll(byte[] array) - Specified by:
retainAllin interfacegnu.trove.TByteCollection
-
removeAll
- Specified by:
removeAllin interfacegnu.trove.TByteCollection
-
removeAll
public boolean removeAll(gnu.trove.TByteCollection collection) - Specified by:
removeAllin interfacegnu.trove.TByteCollection
-
removeAll
public boolean removeAll(byte[] array) - Specified by:
removeAllin interfacegnu.trove.TByteCollection
-
removeAt
public byte removeAt(int offset) - Specified by:
removeAtin interfacegnu.trove.list.TByteList
-
remove
public void remove(int offset, int length) - Specified by:
removein interfacegnu.trove.list.TByteList
-
transformValues
public void transformValues(gnu.trove.function.TByteFunction function) - Specified by:
transformValuesin interfacegnu.trove.list.TByteList
-
reverse
public void reverse()- Specified by:
reversein interfacegnu.trove.list.TByteList
-
reverse
public void reverse(int from, int to) - Specified by:
reversein interfacegnu.trove.list.TByteList
-
shuffle
- Specified by:
shufflein interfacegnu.trove.list.TByteList
-
subList
public gnu.trove.list.TByteList subList(int begin, int end) - Specified by:
subListin interfacegnu.trove.list.TByteList
-
toArray
public byte[] toArray()- Specified by:
toArrayin interfacegnu.trove.TByteCollection- Specified by:
toArrayin interfacegnu.trove.list.TByteList
-
toArray
public byte[] toArray(int offset, int len) - Specified by:
toArrayin interfacegnu.trove.list.TByteList
-
toArray
public byte[] toArray(byte[] dest) - Specified by:
toArrayin interfacegnu.trove.TByteCollection- Specified by:
toArrayin interfacegnu.trove.list.TByteList
-
toArray
public byte[] toArray(byte[] dest, int offset, int len) - Specified by:
toArrayin interfacegnu.trove.list.TByteList
-
toArray
public byte[] toArray(byte[] dest, int source_pos, int dest_pos, int len) - Specified by:
toArrayin interfacegnu.trove.list.TByteList
-
forEach
public boolean forEach(gnu.trove.procedure.TByteProcedure procedure) - Specified by:
forEachin interfacegnu.trove.TByteCollection- Specified by:
forEachin interfacegnu.trove.list.TByteList
-
forEachDescending
public boolean forEachDescending(gnu.trove.procedure.TByteProcedure procedure) - Specified by:
forEachDescendingin interfacegnu.trove.list.TByteList
-
sort
public void sort()- Specified by:
sortin interfacegnu.trove.list.TByteList
-
sort
public void sort(int fromIndex, int toIndex) - Specified by:
sortin interfacegnu.trove.list.TByteList
-
fill
public void fill(byte val) - Specified by:
fillin interfacegnu.trove.list.TByteList
-
fill
public void fill(int fromIndex, int toIndex, byte val) - Specified by:
fillin interfacegnu.trove.list.TByteList
-
binarySearch
public int binarySearch(byte value) - Specified by:
binarySearchin interfacegnu.trove.list.TByteList
-
binarySearch
public int binarySearch(byte value, int fromIndex, int toIndex) - Specified by:
binarySearchin interfacegnu.trove.list.TByteList
-
indexOf
public int indexOf(byte value) - Specified by:
indexOfin interfacegnu.trove.list.TByteList
-
indexOf
public int indexOf(int offset, byte value) - Specified by:
indexOfin interfacegnu.trove.list.TByteList
-
lastIndexOf
public int lastIndexOf(byte value) - Specified by:
lastIndexOfin interfacegnu.trove.list.TByteList
-
lastIndexOf
public int lastIndexOf(int offset, byte value) - Specified by:
lastIndexOfin interfacegnu.trove.list.TByteList
-
contains
public boolean contains(byte value) - Specified by:
containsin interfacegnu.trove.TByteCollection- Specified by:
containsin interfacegnu.trove.list.TByteList
-
iterator
public gnu.trove.iterator.TByteIterator iterator()- Specified by:
iteratorin interfacegnu.trove.TByteCollection
-
grep
public gnu.trove.list.TByteList grep(gnu.trove.procedure.TByteProcedure condition) - Specified by:
grepin interfacegnu.trove.list.TByteList
-
inverseGrep
public gnu.trove.list.TByteList inverseGrep(gnu.trove.procedure.TByteProcedure condition) - Specified by:
inverseGrepin interfacegnu.trove.list.TByteList
-
max
public byte max()- Specified by:
maxin interfacegnu.trove.list.TByteList
-
min
public byte min()- Specified by:
minin interfacegnu.trove.list.TByteList
-
sum
public byte sum()- Specified by:
sumin interfacegnu.trove.list.TByteList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
equals
-
hashCode
public int hashCode() -
toString
-