Package gnu.trove.list.linked
Class TFloatLinkedList
- java.lang.Object
-
- gnu.trove.list.linked.TFloatLinkedList
-
- All Implemented Interfaces:
gnu.trove.list.TFloatList,gnu.trove.TFloatCollection,java.io.Externalizable,java.io.Serializable
public class TFloatLinkedList extends java.lang.Object implements gnu.trove.list.TFloatList, java.io.ExternalizableA resizable, double linked list of float primitives.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TFloatLinkedList()TFloatLinkedList(float no_entry_value)TFloatLinkedList(gnu.trove.list.TFloatList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(float val)voidadd(float[] vals)voidadd(float[] vals, int offset, int length)booleanaddAll(float[] array)booleanaddAll(gnu.trove.TFloatCollection collection)booleanaddAll(java.util.Collection<? extends java.lang.Float> collection)intbinarySearch(float value)intbinarySearch(float value, int fromIndex, int toIndex)voidclear()booleancontains(float value)booleancontainsAll(float[] array)booleancontainsAll(gnu.trove.TFloatCollection collection)booleancontainsAll(java.util.Collection<?> collection)booleanequals(java.lang.Object other)voidfill(float val)voidfill(int fromIndex, int toIndex, float val)booleanforEach(gnu.trove.procedure.TFloatProcedure procedure)booleanforEachDescending(gnu.trove.procedure.TFloatProcedure procedure)floatget(int offset)gnu.trove.list.linked.TFloatLinkedList.TFloatLinkgetLinkAt(int offset)Returns the link at the given offset.floatgetNoEntryValue()gnu.trove.list.TFloatListgrep(gnu.trove.procedure.TFloatProcedure condition)inthashCode()intindexOf(float value)intindexOf(int offset, float value)voidinsert(int offset, float value)voidinsert(int offset, float[] values)voidinsert(int offset, float[] values, int valOffset, int len)gnu.trove.list.TFloatListinverseGrep(gnu.trove.procedure.TFloatProcedure condition)booleanisEmpty()gnu.trove.iterator.TFloatIteratoriterator()intlastIndexOf(float value)intlastIndexOf(int offset, float value)floatmax()floatmin()voidreadExternal(java.io.ObjectInput in)booleanremove(float value)voidremove(int offset, int length)booleanremoveAll(float[] array)booleanremoveAll(gnu.trove.TFloatCollection collection)booleanremoveAll(java.util.Collection<?> collection)floatremoveAt(int offset)floatreplace(int offset, float val)booleanretainAll(float[] array)booleanretainAll(gnu.trove.TFloatCollection collection)booleanretainAll(java.util.Collection<?> collection)voidreverse()voidreverse(int from, int to)floatset(int offset, float val)voidset(int offset, float[] values)voidset(int offset, float[] values, int valOffset, int length)voidshuffle(java.util.Random rand)intsize()voidsort()voidsort(int fromIndex, int toIndex)gnu.trove.list.TFloatListsubList(int begin, int end)floatsum()float[]toArray()float[]toArray(float[] dest)float[]toArray(float[] dest, int offset, int len)float[]toArray(float[] dest, int source_pos, int dest_pos, int len)float[]toArray(int offset, int len)java.lang.StringtoString()voidtransformValues(gnu.trove.function.TFloatFunction function)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
getNoEntryValue
public float getNoEntryValue()
- Specified by:
getNoEntryValuein interfacegnu.trove.TFloatCollection- Specified by:
getNoEntryValuein interfacegnu.trove.list.TFloatList
-
size
public int size()
- Specified by:
sizein interfacegnu.trove.TFloatCollection- Specified by:
sizein interfacegnu.trove.list.TFloatList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacegnu.trove.TFloatCollection- Specified by:
isEmptyin interfacegnu.trove.list.TFloatList
-
add
public boolean add(float val)
- Specified by:
addin interfacegnu.trove.TFloatCollection- Specified by:
addin interfacegnu.trove.list.TFloatList
-
add
public void add(float[] vals)
- Specified by:
addin interfacegnu.trove.list.TFloatList
-
add
public void add(float[] vals, int offset, int length)- Specified by:
addin interfacegnu.trove.list.TFloatList
-
insert
public void insert(int offset, float value)- Specified by:
insertin interfacegnu.trove.list.TFloatList
-
insert
public void insert(int offset, float[] values)- Specified by:
insertin interfacegnu.trove.list.TFloatList
-
insert
public void insert(int offset, float[] values, int valOffset, int len)- Specified by:
insertin interfacegnu.trove.list.TFloatList
-
get
public float get(int offset)
- Specified by:
getin interfacegnu.trove.list.TFloatList
-
getLinkAt
public gnu.trove.list.linked.TFloatLinkedList.TFloatLink 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 float set(int offset, float val)- Specified by:
setin interfacegnu.trove.list.TFloatList
-
set
public void set(int offset, float[] values)- Specified by:
setin interfacegnu.trove.list.TFloatList
-
set
public void set(int offset, float[] values, int valOffset, int length)- Specified by:
setin interfacegnu.trove.list.TFloatList
-
replace
public float replace(int offset, float val)- Specified by:
replacein interfacegnu.trove.list.TFloatList
-
clear
public void clear()
- Specified by:
clearin interfacegnu.trove.TFloatCollection- Specified by:
clearin interfacegnu.trove.list.TFloatList
-
remove
public boolean remove(float value)
- Specified by:
removein interfacegnu.trove.TFloatCollection- Specified by:
removein interfacegnu.trove.list.TFloatList
-
containsAll
public boolean containsAll(java.util.Collection<?> collection)
- Specified by:
containsAllin interfacegnu.trove.TFloatCollection
-
containsAll
public boolean containsAll(gnu.trove.TFloatCollection collection)
- Specified by:
containsAllin interfacegnu.trove.TFloatCollection
-
containsAll
public boolean containsAll(float[] array)
- Specified by:
containsAllin interfacegnu.trove.TFloatCollection
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Float> collection)
- Specified by:
addAllin interfacegnu.trove.TFloatCollection
-
addAll
public boolean addAll(gnu.trove.TFloatCollection collection)
- Specified by:
addAllin interfacegnu.trove.TFloatCollection
-
addAll
public boolean addAll(float[] array)
- Specified by:
addAllin interfacegnu.trove.TFloatCollection
-
retainAll
public boolean retainAll(java.util.Collection<?> collection)
- Specified by:
retainAllin interfacegnu.trove.TFloatCollection
-
retainAll
public boolean retainAll(gnu.trove.TFloatCollection collection)
- Specified by:
retainAllin interfacegnu.trove.TFloatCollection
-
retainAll
public boolean retainAll(float[] array)
- Specified by:
retainAllin interfacegnu.trove.TFloatCollection
-
removeAll
public boolean removeAll(java.util.Collection<?> collection)
- Specified by:
removeAllin interfacegnu.trove.TFloatCollection
-
removeAll
public boolean removeAll(gnu.trove.TFloatCollection collection)
- Specified by:
removeAllin interfacegnu.trove.TFloatCollection
-
removeAll
public boolean removeAll(float[] array)
- Specified by:
removeAllin interfacegnu.trove.TFloatCollection
-
removeAt
public float removeAt(int offset)
- Specified by:
removeAtin interfacegnu.trove.list.TFloatList
-
remove
public void remove(int offset, int length)- Specified by:
removein interfacegnu.trove.list.TFloatList
-
transformValues
public void transformValues(gnu.trove.function.TFloatFunction function)
- Specified by:
transformValuesin interfacegnu.trove.list.TFloatList
-
reverse
public void reverse()
- Specified by:
reversein interfacegnu.trove.list.TFloatList
-
reverse
public void reverse(int from, int to)- Specified by:
reversein interfacegnu.trove.list.TFloatList
-
shuffle
public void shuffle(java.util.Random rand)
- Specified by:
shufflein interfacegnu.trove.list.TFloatList
-
subList
public gnu.trove.list.TFloatList subList(int begin, int end)- Specified by:
subListin interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray()
- Specified by:
toArrayin interfacegnu.trove.TFloatCollection- Specified by:
toArrayin interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(int offset, int len)- Specified by:
toArrayin interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(float[] dest)
- Specified by:
toArrayin interfacegnu.trove.TFloatCollection- Specified by:
toArrayin interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(float[] dest, int offset, int len)- Specified by:
toArrayin interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(float[] dest, int source_pos, int dest_pos, int len)- Specified by:
toArrayin interfacegnu.trove.list.TFloatList
-
forEach
public boolean forEach(gnu.trove.procedure.TFloatProcedure procedure)
- Specified by:
forEachin interfacegnu.trove.TFloatCollection- Specified by:
forEachin interfacegnu.trove.list.TFloatList
-
forEachDescending
public boolean forEachDescending(gnu.trove.procedure.TFloatProcedure procedure)
- Specified by:
forEachDescendingin interfacegnu.trove.list.TFloatList
-
sort
public void sort()
- Specified by:
sortin interfacegnu.trove.list.TFloatList
-
sort
public void sort(int fromIndex, int toIndex)- Specified by:
sortin interfacegnu.trove.list.TFloatList
-
fill
public void fill(float val)
- Specified by:
fillin interfacegnu.trove.list.TFloatList
-
fill
public void fill(int fromIndex, int toIndex, float val)- Specified by:
fillin interfacegnu.trove.list.TFloatList
-
binarySearch
public int binarySearch(float value)
- Specified by:
binarySearchin interfacegnu.trove.list.TFloatList
-
binarySearch
public int binarySearch(float value, int fromIndex, int toIndex)- Specified by:
binarySearchin interfacegnu.trove.list.TFloatList
-
indexOf
public int indexOf(float value)
- Specified by:
indexOfin interfacegnu.trove.list.TFloatList
-
indexOf
public int indexOf(int offset, float value)- Specified by:
indexOfin interfacegnu.trove.list.TFloatList
-
lastIndexOf
public int lastIndexOf(float value)
- Specified by:
lastIndexOfin interfacegnu.trove.list.TFloatList
-
lastIndexOf
public int lastIndexOf(int offset, float value)- Specified by:
lastIndexOfin interfacegnu.trove.list.TFloatList
-
contains
public boolean contains(float value)
- Specified by:
containsin interfacegnu.trove.TFloatCollection- Specified by:
containsin interfacegnu.trove.list.TFloatList
-
iterator
public gnu.trove.iterator.TFloatIterator iterator()
- Specified by:
iteratorin interfacegnu.trove.TFloatCollection
-
grep
public gnu.trove.list.TFloatList grep(gnu.trove.procedure.TFloatProcedure condition)
- Specified by:
grepin interfacegnu.trove.list.TFloatList
-
inverseGrep
public gnu.trove.list.TFloatList inverseGrep(gnu.trove.procedure.TFloatProcedure condition)
- Specified by:
inverseGrepin interfacegnu.trove.list.TFloatList
-
max
public float max()
- Specified by:
maxin interfacegnu.trove.list.TFloatList
-
min
public float min()
- Specified by:
minin interfacegnu.trove.list.TFloatList
-
sum
public float sum()
- Specified by:
sumin interfacegnu.trove.list.TFloatList
-
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.TFloatCollection- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacegnu.trove.TFloatCollection- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-