Class TFloatLinkedList

java.lang.Object
gnu.trove.list.linked.TFloatLinkedList
All Implemented Interfaces:
gnu.trove.list.TFloatList, gnu.trove.TFloatCollection, Externalizable, Serializable

public class TFloatLinkedList extends Object implements gnu.trove.list.TFloatList, Externalizable
A resizable, double linked list of float primitives.
See Also:
  • Constructor Details

    • TFloatLinkedList

      public TFloatLinkedList()
    • TFloatLinkedList

      public TFloatLinkedList(float no_entry_value)
    • TFloatLinkedList

      public TFloatLinkedList(gnu.trove.list.TFloatList list)
  • Method Details

    • getNoEntryValue

      public float getNoEntryValue()
      Specified by:
      getNoEntryValue in interface gnu.trove.TFloatCollection
      Specified by:
      getNoEntryValue in interface gnu.trove.list.TFloatList
    • size

      public int size()
      Specified by:
      size in interface gnu.trove.TFloatCollection
      Specified by:
      size in interface gnu.trove.list.TFloatList
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface gnu.trove.TFloatCollection
      Specified by:
      isEmpty in interface gnu.trove.list.TFloatList
    • add

      public boolean add(float val)
      Specified by:
      add in interface gnu.trove.TFloatCollection
      Specified by:
      add in interface gnu.trove.list.TFloatList
    • add

      public void add(float[] vals)
      Specified by:
      add in interface gnu.trove.list.TFloatList
    • add

      public void add(float[] vals, int offset, int length)
      Specified by:
      add in interface gnu.trove.list.TFloatList
    • insert

      public void insert(int offset, float value)
      Specified by:
      insert in interface gnu.trove.list.TFloatList
    • insert

      public void insert(int offset, float[] values)
      Specified by:
      insert in interface gnu.trove.list.TFloatList
    • insert

      public void insert(int offset, float[] values, int valOffset, int len)
      Specified by:
      insert in interface gnu.trove.list.TFloatList
    • get

      public float get(int offset)
      Specified by:
      get in interface gnu.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 interface gnu.trove.list.TFloatList
    • set

      public void set(int offset, float[] values)
      Specified by:
      set in interface gnu.trove.list.TFloatList
    • set

      public void set(int offset, float[] values, int valOffset, int length)
      Specified by:
      set in interface gnu.trove.list.TFloatList
    • replace

      public float replace(int offset, float val)
      Specified by:
      replace in interface gnu.trove.list.TFloatList
    • clear

      public void clear()
      Specified by:
      clear in interface gnu.trove.TFloatCollection
      Specified by:
      clear in interface gnu.trove.list.TFloatList
    • remove

      public boolean remove(float value)
      Specified by:
      remove in interface gnu.trove.TFloatCollection
      Specified by:
      remove in interface gnu.trove.list.TFloatList
    • containsAll

      public boolean containsAll(Collection<?> collection)
      Specified by:
      containsAll in interface gnu.trove.TFloatCollection
    • containsAll

      public boolean containsAll(gnu.trove.TFloatCollection collection)
      Specified by:
      containsAll in interface gnu.trove.TFloatCollection
    • containsAll

      public boolean containsAll(float[] array)
      Specified by:
      containsAll in interface gnu.trove.TFloatCollection
    • addAll

      public boolean addAll(Collection<? extends Float> collection)
      Specified by:
      addAll in interface gnu.trove.TFloatCollection
    • addAll

      public boolean addAll(gnu.trove.TFloatCollection collection)
      Specified by:
      addAll in interface gnu.trove.TFloatCollection
    • addAll

      public boolean addAll(float[] array)
      Specified by:
      addAll in interface gnu.trove.TFloatCollection
    • retainAll

      public boolean retainAll(Collection<?> collection)
      Specified by:
      retainAll in interface gnu.trove.TFloatCollection
    • retainAll

      public boolean retainAll(gnu.trove.TFloatCollection collection)
      Specified by:
      retainAll in interface gnu.trove.TFloatCollection
    • retainAll

      public boolean retainAll(float[] array)
      Specified by:
      retainAll in interface gnu.trove.TFloatCollection
    • removeAll

      public boolean removeAll(Collection<?> collection)
      Specified by:
      removeAll in interface gnu.trove.TFloatCollection
    • removeAll

      public boolean removeAll(gnu.trove.TFloatCollection collection)
      Specified by:
      removeAll in interface gnu.trove.TFloatCollection
    • removeAll

      public boolean removeAll(float[] array)
      Specified by:
      removeAll in interface gnu.trove.TFloatCollection
    • removeAt

      public float removeAt(int offset)
      Specified by:
      removeAt in interface gnu.trove.list.TFloatList
    • remove

      public void remove(int offset, int length)
      Specified by:
      remove in interface gnu.trove.list.TFloatList
    • transformValues

      public void transformValues(gnu.trove.function.TFloatFunction function)
      Specified by:
      transformValues in interface gnu.trove.list.TFloatList
    • reverse

      public void reverse()
      Specified by:
      reverse in interface gnu.trove.list.TFloatList
    • reverse

      public void reverse(int from, int to)
      Specified by:
      reverse in interface gnu.trove.list.TFloatList
    • shuffle

      public void shuffle(Random rand)
      Specified by:
      shuffle in interface gnu.trove.list.TFloatList
    • subList

      public gnu.trove.list.TFloatList subList(int begin, int end)
      Specified by:
      subList in interface gnu.trove.list.TFloatList
    • toArray

      public float[] toArray()
      Specified by:
      toArray in interface gnu.trove.TFloatCollection
      Specified by:
      toArray in interface gnu.trove.list.TFloatList
    • toArray

      public float[] toArray(int offset, int len)
      Specified by:
      toArray in interface gnu.trove.list.TFloatList
    • toArray

      public float[] toArray(float[] dest)
      Specified by:
      toArray in interface gnu.trove.TFloatCollection
      Specified by:
      toArray in interface gnu.trove.list.TFloatList
    • toArray

      public float[] toArray(float[] dest, int offset, int len)
      Specified by:
      toArray in interface gnu.trove.list.TFloatList
    • toArray

      public float[] toArray(float[] dest, int source_pos, int dest_pos, int len)
      Specified by:
      toArray in interface gnu.trove.list.TFloatList
    • forEach

      public boolean forEach(gnu.trove.procedure.TFloatProcedure procedure)
      Specified by:
      forEach in interface gnu.trove.TFloatCollection
      Specified by:
      forEach in interface gnu.trove.list.TFloatList
    • forEachDescending

      public boolean forEachDescending(gnu.trove.procedure.TFloatProcedure procedure)
      Specified by:
      forEachDescending in interface gnu.trove.list.TFloatList
    • sort

      public void sort()
      Specified by:
      sort in interface gnu.trove.list.TFloatList
    • sort

      public void sort(int fromIndex, int toIndex)
      Specified by:
      sort in interface gnu.trove.list.TFloatList
    • fill

      public void fill(float val)
      Specified by:
      fill in interface gnu.trove.list.TFloatList
    • fill

      public void fill(int fromIndex, int toIndex, float val)
      Specified by:
      fill in interface gnu.trove.list.TFloatList
    • binarySearch

      public int binarySearch(float value)
      Specified by:
      binarySearch in interface gnu.trove.list.TFloatList
    • binarySearch

      public int binarySearch(float value, int fromIndex, int toIndex)
      Specified by:
      binarySearch in interface gnu.trove.list.TFloatList
    • indexOf

      public int indexOf(float value)
      Specified by:
      indexOf in interface gnu.trove.list.TFloatList
    • indexOf

      public int indexOf(int offset, float value)
      Specified by:
      indexOf in interface gnu.trove.list.TFloatList
    • lastIndexOf

      public int lastIndexOf(float value)
      Specified by:
      lastIndexOf in interface gnu.trove.list.TFloatList
    • lastIndexOf

      public int lastIndexOf(int offset, float value)
      Specified by:
      lastIndexOf in interface gnu.trove.list.TFloatList
    • contains

      public boolean contains(float value)
      Specified by:
      contains in interface gnu.trove.TFloatCollection
      Specified by:
      contains in interface gnu.trove.list.TFloatList
    • iterator

      public gnu.trove.iterator.TFloatIterator iterator()
      Specified by:
      iterator in interface gnu.trove.TFloatCollection
    • grep

      public gnu.trove.list.TFloatList grep(gnu.trove.procedure.TFloatProcedure condition)
      Specified by:
      grep in interface gnu.trove.list.TFloatList
    • inverseGrep

      public gnu.trove.list.TFloatList inverseGrep(gnu.trove.procedure.TFloatProcedure condition)
      Specified by:
      inverseGrep in interface gnu.trove.list.TFloatList
    • max

      public float max()
      Specified by:
      max in interface gnu.trove.list.TFloatList
    • min

      public float min()
      Specified by:
      min in interface gnu.trove.list.TFloatList
    • sum

      public float sum()
      Specified by:
      sum in interface gnu.trove.list.TFloatList
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException
    • equals

      public boolean equals(Object other)
      Specified by:
      equals in interface gnu.trove.TFloatCollection
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface gnu.trove.TFloatCollection
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object