Klasse AbstractByteList

Alle implementierten Schnittstellen:
Iterable<Byte>, Collection<Byte>, List<Byte>, ByteCollection, ByteIterable, ByteList, ISizeProvider
Bekannte direkte Unterklassen:
ByteArrayList, ByteLinkedList, CopyOnWriteByteArrayList, ImmutableByteList

public abstract class AbstractByteList extends AbstractByteCollection implements ByteList
Abstract implementation of the ByteList interface.
  • Konstruktordetails

    • AbstractByteList

      public AbstractByteList()
  • Methodendetails

    • add

      public boolean add(byte e)
      A Type-Specific implementation of add function that delegates to List.add(int, Object)
      Angegeben von:
      add in Schnittstelle ByteCollection
      Angegeben von:
      add in Schnittstelle ByteList
      Parameter:
      e - the element to add
      Gibt zurück:
      true if the list was modified
      Siehe auch:
    • add

      @Deprecated public void add(int index, Byte element)
      Veraltet.
      Please use the corresponding type-specific function instead.

      This default implementation delegates to the corresponding type-specific function.

      Angegeben von:
      add in Schnittstelle List<Byte>
    • addAll

      public boolean addAll(ByteCollection c)
      A Type-Specific implementation that iterates over the elements and adds them.
      Angegeben von:
      addAll in Schnittstelle ByteCollection
      Setzt außer Kraft:
      addAll in Klasse AbstractByteCollection
      Parameter:
      c - the elements that wants to be added
      Gibt zurück:
      true if the list was modified
    • addAll

      public boolean addAll(ByteList c)
      A Type-Specific implementation that iterates over the elements and adds them.
      Angegeben von:
      addAll in Schnittstelle ByteList
      Parameter:
      c - the elements that wants to be added
      Gibt zurück:
      true if the list was modified
    • addAll

      @Deprecated public boolean addAll(Collection<? extends Byte> c)
      Veraltet.
      Please use the corresponding type-specific function instead.

      This default implementation delegates to the corresponding type-specific function.

      This default implementation delegates to the corresponding type-specific function.

      Angegeben von:
      addAll in Schnittstelle Collection<Byte>
      Angegeben von:
      addAll in Schnittstelle List<Byte>
      Setzt außer Kraft:
      addAll in Klasse AbstractByteCollection
    • indexOf

      @Deprecated public int indexOf(Object o)
      Veraltet.
      The IndexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      indexOf in Schnittstelle ByteList
      Angegeben von:
      indexOf in Schnittstelle List<Byte>
      Parameter:
      o - the value that the index is searched for.
      Gibt zurück:
      index of the value that was searched for. -1 if not found
      Note:
      it is highly suggested not to use this with Primitives because of boxing. But it is still supported because of ObjectComparason that are custom objects and allow to find the contents.
    • lastIndexOf

      @Deprecated public int lastIndexOf(Object o)
      Veraltet.
      The lastIndexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      lastIndexOf in Schnittstelle ByteList
      Angegeben von:
      lastIndexOf in Schnittstelle List<Byte>
      Parameter:
      o - the value that the index is searched for.
      Gibt zurück:
      the last index of the value that was searched for. -1 if not found
      Note:
      it is highly suggested not to use this with Primitives because of boxing. But it is still supported because of ObjectComparason that are custom objects and allow to find the contents.
    • indexOf

      public int indexOf(byte e)
      The indexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      indexOf in Schnittstelle ByteList
      Parameter:
      e - the value that the index is searched for.
      Gibt zurück:
      index of the value that was searched for. -1 if not found
    • lastIndexOf

      public int lastIndexOf(byte e)
      The lastIndexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      lastIndexOf in Schnittstelle ByteList
      Parameter:
      e - the value that the index is searched for.
      Gibt zurück:
      the last index of the value that was searched for. -1 if not found
    • swapRemoveByte

      public boolean swapRemoveByte(byte e)
      Beschreibung aus Schnittstelle kopiert: ByteList
      A Highly Optimized remove function that removes the desired element. But instead of shifting the elements to the left it moves the last element to the removed space.
      Angegeben von:
      swapRemoveByte in Schnittstelle ByteList
      Parameter:
      e - the element that should be removed
      Gibt zurück:
      true if the element was removed
    • equals

      public boolean equals(Object o)
      Compares if the list are the same.
      Angegeben von:
      equals in Schnittstelle Collection<Byte>
      Angegeben von:
      equals in Schnittstelle List<Byte>
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Generates the hashcode based on the values stored in the list.
      Angegeben von:
      hashCode in Schnittstelle Collection<Byte>
      Angegeben von:
      hashCode in Schnittstelle List<Byte>
      Setzt außer Kraft:
      hashCode in Klasse Object
    • subList

      public ByteList subList(int fromIndex, int toIndex)
      Beschreibung aus Schnittstelle kopiert: ByteList
      A Type-Specific List of subList
      Angegeben von:
      subList in Schnittstelle ByteList
      Angegeben von:
      subList in Schnittstelle List<Byte>
      Siehe auch:
    • reversed

      public ByteList reversed()
      Beschreibung aus Schnittstelle kopiert: ByteList
      A Type-Specific List Helper that shows all elements in reverse.
      Angegeben von:
      reversed in Schnittstelle ByteList
      Gibt zurück:
      a list wrapper that has all elements reversed!
    • iterator

      public ByteIterator iterator()
      Beschreibung aus Schnittstelle kopiert: ByteCollection
      Returns a Type-Specific Iterator to reduce (un)boxing
      Angegeben von:
      iterator in Schnittstelle ByteCollection
      Angegeben von:
      iterator in Schnittstelle ByteIterable
      Angegeben von:
      iterator in Schnittstelle Collection<Byte>
      Angegeben von:
      iterator in Schnittstelle Iterable<Byte>
      Angegeben von:
      iterator in Schnittstelle List<Byte>
      Angegeben von:
      iterator in Klasse AbstractByteCollection
      Gibt zurück:
      a iterator of the collection
      Siehe auch:
    • listIterator

      public ByteListIterator listIterator()
      Beschreibung aus Schnittstelle kopiert: ByteList
      A Type-Specific Iterator of listIterator
      Angegeben von:
      listIterator in Schnittstelle ByteList
      Angegeben von:
      listIterator in Schnittstelle List<Byte>
      Siehe auch:
    • listIterator

      public ByteListIterator listIterator(int index)
      Beschreibung aus Schnittstelle kopiert: ByteList
      A Type-Specific Iterator of listIterator
      Angegeben von:
      listIterator in Schnittstelle ByteList
      Angegeben von:
      listIterator in Schnittstelle List<Byte>
      Siehe auch:
    • indexedIterator

      public ByteListIterator indexedIterator(int... indecies)
      Beschreibung aus Schnittstelle kopiert: ByteList
      Creates a Iterator that follows the indecies provided.
      For example if the Lists Contents is:
      -1, 0 1
      and the indecies are:
      0, 1, 2, 2, 1, 0
      then the iterator will return the following values:
      -1, 0, 1, 1, 0, -1
      Angegeben von:
      indexedIterator in Schnittstelle ByteList
      Parameter:
      indecies - that should be used for the iteration.
      Gibt zurück:
      a custom indexed iterator
    • indexedIterator

      public ByteListIterator indexedIterator(IntList indecies)
      Beschreibung aus Schnittstelle kopiert: ByteList
      Creates a Iterator that follows the indecies provided.
      For example if the Lists Contents is:
      -1, 0 1
      and the indecies are:
      0, 1, 2, 2, 1, 0
      then the iterator will return the following values:
      -1, 0, 1, 1, 0, -1
      Angegeben von:
      indexedIterator in Schnittstelle ByteList
      Parameter:
      indecies - that should be used for the iteration.
      Gibt zurück:
      a custom indexed iterator
    • size

      public void size(int size)
      Beschreibung aus Schnittstelle kopiert: ByteList
      A function to ensure the elements are within the requested size. If smaller then the stored elements they get removed as needed. If bigger it is ensured that enough room is provided depending on the implementation
      Angegeben von:
      size in Schnittstelle ByteList
      Parameter:
      size - the requested amount of elements/room for elements
    • copy

      public AbstractByteList copy()
      Beschreibung aus Schnittstelle kopiert: ByteCollection
      A Function that does a shallow clone of the Collection itself. This function is more optimized then a copy constructor since the Collection does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk
      Angegeben von:
      copy in Schnittstelle ByteCollection
      Angegeben von:
      copy in Schnittstelle ByteList
      Setzt außer Kraft:
      copy in Klasse AbstractByteCollection
      Gibt zurück:
      a Shallow Copy of the collection