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.Externalizable
A 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 boolean
add(float val)
void
add(float[] vals)
void
add(float[] vals, int offset, int length)
boolean
addAll(float[] array)
boolean
addAll(gnu.trove.TFloatCollection collection)
boolean
addAll(java.util.Collection<? extends java.lang.Float> collection)
int
binarySearch(float value)
int
binarySearch(float value, int fromIndex, int toIndex)
void
clear()
boolean
contains(float value)
boolean
containsAll(float[] array)
boolean
containsAll(gnu.trove.TFloatCollection collection)
boolean
containsAll(java.util.Collection<?> collection)
boolean
equals(java.lang.Object other)
void
fill(float val)
void
fill(int fromIndex, int toIndex, float val)
boolean
forEach(gnu.trove.procedure.TFloatProcedure procedure)
boolean
forEachDescending(gnu.trove.procedure.TFloatProcedure procedure)
float
get(int offset)
gnu.trove.list.linked.TFloatLinkedList.TFloatLink
getLinkAt(int offset)
Returns the link at the given offset.float
getNoEntryValue()
gnu.trove.list.TFloatList
grep(gnu.trove.procedure.TFloatProcedure condition)
int
hashCode()
int
indexOf(float value)
int
indexOf(int offset, float value)
void
insert(int offset, float value)
void
insert(int offset, float[] values)
void
insert(int offset, float[] values, int valOffset, int len)
gnu.trove.list.TFloatList
inverseGrep(gnu.trove.procedure.TFloatProcedure condition)
boolean
isEmpty()
gnu.trove.iterator.TFloatIterator
iterator()
int
lastIndexOf(float value)
int
lastIndexOf(int offset, float value)
float
max()
float
min()
void
readExternal(java.io.ObjectInput in)
boolean
remove(float value)
void
remove(int offset, int length)
boolean
removeAll(float[] array)
boolean
removeAll(gnu.trove.TFloatCollection collection)
boolean
removeAll(java.util.Collection<?> collection)
float
removeAt(int offset)
float
replace(int offset, float val)
boolean
retainAll(float[] array)
boolean
retainAll(gnu.trove.TFloatCollection collection)
boolean
retainAll(java.util.Collection<?> collection)
void
reverse()
void
reverse(int from, int to)
float
set(int offset, float val)
void
set(int offset, float[] values)
void
set(int offset, float[] values, int valOffset, int length)
void
shuffle(java.util.Random rand)
int
size()
void
sort()
void
sort(int fromIndex, int toIndex)
gnu.trove.list.TFloatList
subList(int begin, int end)
float
sum()
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.String
toString()
void
transformValues(gnu.trove.function.TFloatFunction function)
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
getNoEntryValue
public float getNoEntryValue()
- Specified by:
getNoEntryValue
in interfacegnu.trove.TFloatCollection
- Specified by:
getNoEntryValue
in interfacegnu.trove.list.TFloatList
-
size
public int size()
- Specified by:
size
in interfacegnu.trove.TFloatCollection
- Specified by:
size
in interfacegnu.trove.list.TFloatList
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacegnu.trove.TFloatCollection
- Specified by:
isEmpty
in interfacegnu.trove.list.TFloatList
-
add
public boolean add(float val)
- Specified by:
add
in interfacegnu.trove.TFloatCollection
- Specified by:
add
in interfacegnu.trove.list.TFloatList
-
add
public void add(float[] vals)
- Specified by:
add
in interfacegnu.trove.list.TFloatList
-
add
public void add(float[] vals, int offset, int length)
- Specified by:
add
in interfacegnu.trove.list.TFloatList
-
insert
public void insert(int offset, float value)
- Specified by:
insert
in interfacegnu.trove.list.TFloatList
-
insert
public void insert(int offset, float[] values)
- Specified by:
insert
in interfacegnu.trove.list.TFloatList
-
insert
public void insert(int offset, float[] values, int valOffset, int len)
- Specified by:
insert
in interfacegnu.trove.list.TFloatList
-
get
public float get(int offset)
- Specified by:
get
in 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:
set
in interfacegnu.trove.list.TFloatList
-
set
public void set(int offset, float[] values)
- Specified by:
set
in interfacegnu.trove.list.TFloatList
-
set
public void set(int offset, float[] values, int valOffset, int length)
- Specified by:
set
in interfacegnu.trove.list.TFloatList
-
replace
public float replace(int offset, float val)
- Specified by:
replace
in interfacegnu.trove.list.TFloatList
-
clear
public void clear()
- Specified by:
clear
in interfacegnu.trove.TFloatCollection
- Specified by:
clear
in interfacegnu.trove.list.TFloatList
-
remove
public boolean remove(float value)
- Specified by:
remove
in interfacegnu.trove.TFloatCollection
- Specified by:
remove
in interfacegnu.trove.list.TFloatList
-
containsAll
public boolean containsAll(java.util.Collection<?> collection)
- Specified by:
containsAll
in interfacegnu.trove.TFloatCollection
-
containsAll
public boolean containsAll(gnu.trove.TFloatCollection collection)
- Specified by:
containsAll
in interfacegnu.trove.TFloatCollection
-
containsAll
public boolean containsAll(float[] array)
- Specified by:
containsAll
in interfacegnu.trove.TFloatCollection
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Float> collection)
- Specified by:
addAll
in interfacegnu.trove.TFloatCollection
-
addAll
public boolean addAll(gnu.trove.TFloatCollection collection)
- Specified by:
addAll
in interfacegnu.trove.TFloatCollection
-
addAll
public boolean addAll(float[] array)
- Specified by:
addAll
in interfacegnu.trove.TFloatCollection
-
retainAll
public boolean retainAll(java.util.Collection<?> collection)
- Specified by:
retainAll
in interfacegnu.trove.TFloatCollection
-
retainAll
public boolean retainAll(gnu.trove.TFloatCollection collection)
- Specified by:
retainAll
in interfacegnu.trove.TFloatCollection
-
retainAll
public boolean retainAll(float[] array)
- Specified by:
retainAll
in interfacegnu.trove.TFloatCollection
-
removeAll
public boolean removeAll(java.util.Collection<?> collection)
- Specified by:
removeAll
in interfacegnu.trove.TFloatCollection
-
removeAll
public boolean removeAll(gnu.trove.TFloatCollection collection)
- Specified by:
removeAll
in interfacegnu.trove.TFloatCollection
-
removeAll
public boolean removeAll(float[] array)
- Specified by:
removeAll
in interfacegnu.trove.TFloatCollection
-
removeAt
public float removeAt(int offset)
- Specified by:
removeAt
in interfacegnu.trove.list.TFloatList
-
remove
public void remove(int offset, int length)
- Specified by:
remove
in interfacegnu.trove.list.TFloatList
-
transformValues
public void transformValues(gnu.trove.function.TFloatFunction function)
- Specified by:
transformValues
in interfacegnu.trove.list.TFloatList
-
reverse
public void reverse()
- Specified by:
reverse
in interfacegnu.trove.list.TFloatList
-
reverse
public void reverse(int from, int to)
- Specified by:
reverse
in interfacegnu.trove.list.TFloatList
-
shuffle
public void shuffle(java.util.Random rand)
- Specified by:
shuffle
in interfacegnu.trove.list.TFloatList
-
subList
public gnu.trove.list.TFloatList subList(int begin, int end)
- Specified by:
subList
in interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray()
- Specified by:
toArray
in interfacegnu.trove.TFloatCollection
- Specified by:
toArray
in interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(int offset, int len)
- Specified by:
toArray
in interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(float[] dest)
- Specified by:
toArray
in interfacegnu.trove.TFloatCollection
- Specified by:
toArray
in interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(float[] dest, int offset, int len)
- Specified by:
toArray
in interfacegnu.trove.list.TFloatList
-
toArray
public float[] toArray(float[] dest, int source_pos, int dest_pos, int len)
- Specified by:
toArray
in interfacegnu.trove.list.TFloatList
-
forEach
public boolean forEach(gnu.trove.procedure.TFloatProcedure procedure)
- Specified by:
forEach
in interfacegnu.trove.TFloatCollection
- Specified by:
forEach
in interfacegnu.trove.list.TFloatList
-
forEachDescending
public boolean forEachDescending(gnu.trove.procedure.TFloatProcedure procedure)
- Specified by:
forEachDescending
in interfacegnu.trove.list.TFloatList
-
sort
public void sort()
- Specified by:
sort
in interfacegnu.trove.list.TFloatList
-
sort
public void sort(int fromIndex, int toIndex)
- Specified by:
sort
in interfacegnu.trove.list.TFloatList
-
fill
public void fill(float val)
- Specified by:
fill
in interfacegnu.trove.list.TFloatList
-
fill
public void fill(int fromIndex, int toIndex, float val)
- Specified by:
fill
in interfacegnu.trove.list.TFloatList
-
binarySearch
public int binarySearch(float value)
- Specified by:
binarySearch
in interfacegnu.trove.list.TFloatList
-
binarySearch
public int binarySearch(float value, int fromIndex, int toIndex)
- Specified by:
binarySearch
in interfacegnu.trove.list.TFloatList
-
indexOf
public int indexOf(float value)
- Specified by:
indexOf
in interfacegnu.trove.list.TFloatList
-
indexOf
public int indexOf(int offset, float value)
- Specified by:
indexOf
in interfacegnu.trove.list.TFloatList
-
lastIndexOf
public int lastIndexOf(float value)
- Specified by:
lastIndexOf
in interfacegnu.trove.list.TFloatList
-
lastIndexOf
public int lastIndexOf(int offset, float value)
- Specified by:
lastIndexOf
in interfacegnu.trove.list.TFloatList
-
contains
public boolean contains(float value)
- Specified by:
contains
in interfacegnu.trove.TFloatCollection
- Specified by:
contains
in interfacegnu.trove.list.TFloatList
-
iterator
public gnu.trove.iterator.TFloatIterator iterator()
- Specified by:
iterator
in interfacegnu.trove.TFloatCollection
-
grep
public gnu.trove.list.TFloatList grep(gnu.trove.procedure.TFloatProcedure condition)
- Specified by:
grep
in interfacegnu.trove.list.TFloatList
-
inverseGrep
public gnu.trove.list.TFloatList inverseGrep(gnu.trove.procedure.TFloatProcedure condition)
- Specified by:
inverseGrep
in interfacegnu.trove.list.TFloatList
-
max
public float max()
- Specified by:
max
in interfacegnu.trove.list.TFloatList
-
min
public float min()
- Specified by:
min
in interfacegnu.trove.list.TFloatList
-
sum
public float sum()
- Specified by:
sum
in interfacegnu.trove.list.TFloatList
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
equals
public boolean equals(java.lang.Object other)
- Specified by:
equals
in interfacegnu.trove.TFloatCollection
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacegnu.trove.TFloatCollection
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-