Class TByteLinkedList

java.lang.Object
gnu.trove.list.linked.TByteLinkedList
All Implemented Interfaces:
gnu.trove.list.TByteList, gnu.trove.TByteCollection, Externalizable, Serializable

public class TByteLinkedList extends Object implements gnu.trove.list.TByteList, Externalizable
A resizable, double linked list of byte primitives.
See Also:
  • Constructor Details

    • TByteLinkedList

      public TByteLinkedList()
    • TByteLinkedList

      public TByteLinkedList(byte no_entry_value)
    • TByteLinkedList

      public TByteLinkedList(gnu.trove.list.TByteList list)
  • Method Details

    • getNoEntryValue

      public byte getNoEntryValue()
      Specified by:
      getNoEntryValue in interface gnu.trove.TByteCollection
      Specified by:
      getNoEntryValue in interface gnu.trove.list.TByteList
    • size

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

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

      public boolean add(byte val)
      Specified by:
      add in interface gnu.trove.TByteCollection
      Specified by:
      add in interface gnu.trove.list.TByteList
    • add

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

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

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

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

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

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

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

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

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

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

      public boolean remove(byte value)
      Specified by:
      remove in interface gnu.trove.TByteCollection
      Specified by:
      remove in interface gnu.trove.list.TByteList
    • containsAll

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public byte[] toArray()
      Specified by:
      toArray in interface gnu.trove.TByteCollection
      Specified by:
      toArray in interface gnu.trove.list.TByteList
    • toArray

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

      public byte[] toArray(byte[] dest)
      Specified by:
      toArray in interface gnu.trove.TByteCollection
      Specified by:
      toArray in interface gnu.trove.list.TByteList
    • toArray

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

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

      public boolean forEach(gnu.trove.procedure.TByteProcedure procedure)
      Specified by:
      forEach in interface gnu.trove.TByteCollection
      Specified by:
      forEach in interface gnu.trove.list.TByteList
    • forEachDescending

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

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

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

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

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

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

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

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

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

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

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

      public boolean contains(byte value)
      Specified by:
      contains in interface gnu.trove.TByteCollection
      Specified by:
      contains in interface gnu.trove.list.TByteList
    • iterator

      public gnu.trove.iterator.TByteIterator iterator()
      Specified by:
      iterator in interface gnu.trove.TByteCollection
    • grep

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

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

      public byte max()
      Specified by:
      max in interface gnu.trove.list.TByteList
    • min

      public byte min()
      Specified by:
      min in interface gnu.trove.list.TByteList
    • sum

      public byte sum()
      Specified by:
      sum in interface gnu.trove.list.TByteList
    • 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.TByteCollection
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object