Class 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
    • Field Summary

      • Fields inherited from interface gnu.trove.TFloatCollection

        serialVersionUID
    • 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)
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TFloatLinkedList

        public TFloatLinkedList()
      • TFloatLinkedList

        public TFloatLinkedList​(float no_entry_value)
      • TFloatLinkedList

        public TFloatLinkedList​(gnu.trove.list.TFloatList list)
    • Method Detail

      • 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​(java.util.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​(java.util.Collection<? extends java.lang.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​(java.util.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​(java.util.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​(java.util.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​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.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 interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • equals

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object