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,java.io.Externalizable,java.io.Serializable
public class TByteLinkedList extends java.lang.Object implements gnu.trove.list.TByteList, java.io.ExternalizableA resizable, double linked list of byte primitives.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TByteLinkedList()TByteLinkedList(byte no_entry_value)TByteLinkedList(gnu.trove.list.TByteList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(byte val)voidadd(byte[] vals)voidadd(byte[] vals, int offset, int length)booleanaddAll(byte[] array)booleanaddAll(gnu.trove.TByteCollection collection)booleanaddAll(java.util.Collection<? extends java.lang.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(java.util.Collection<?> collection)booleanequals(java.lang.Object other)voidfill(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.bytegetNoEntryValue()gnu.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()voidreadExternal(java.io.ObjectInput in)booleanremove(byte value)voidremove(int offset, int length)booleanremoveAll(byte[] array)booleanremoveAll(gnu.trove.TByteCollection collection)booleanremoveAll(java.util.Collection<?> collection)byteremoveAt(int offset)bytereplace(int offset, byte val)booleanretainAll(byte[] array)booleanretainAll(gnu.trove.TByteCollection collection)booleanretainAll(java.util.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)voidshuffle(java.util.Random rand)intsize()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)java.lang.StringtoString()voidtransformValues(gnu.trove.function.TByteFunction function)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
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
public boolean containsAll(java.util.Collection<?> collection)
- 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
public boolean addAll(java.util.Collection<? extends java.lang.Byte> collection)
- 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
public boolean retainAll(java.util.Collection<?> collection)
- 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
public boolean removeAll(java.util.Collection<?> collection)
- 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
public void shuffle(java.util.Random rand)
- 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
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
equals
public boolean equals(java.lang.Object other)
- Specified by:
equalsin interfacegnu.trove.TByteCollection- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacegnu.trove.TByteCollection- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-