Klasse AbstractBooleanList

Alle implementierten Schnittstellen:
Iterable<Boolean>, Collection<Boolean>, List<Boolean>, BooleanCollection, BooleanIterable, BooleanList, ISizeProvider
Bekannte direkte Unterklassen:
BooleanArrayList, BooleanLinkedList, CopyOnWriteBooleanArrayList, ImmutableBooleanList

public abstract class AbstractBooleanList extends AbstractBooleanCollection implements BooleanList
Abstract implementation of the BooleanList interface.
  • Konstruktordetails

    • AbstractBooleanList

      public AbstractBooleanList()
  • Methodendetails

    • add

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

      @Deprecated public void add(int index, Boolean 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<Boolean>
    • addAll

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

      public boolean addAll(BooleanList c)
      A Type-Specific implementation that iterates over the elements and adds them.
      Angegeben von:
      addAll in Schnittstelle BooleanList
      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 Boolean> 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<Boolean>
      Angegeben von:
      addAll in Schnittstelle List<Boolean>
      Setzt außer Kraft:
      addAll in Klasse AbstractBooleanCollection
    • 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 BooleanList
      Angegeben von:
      indexOf in Schnittstelle List<Boolean>
      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 BooleanList
      Angegeben von:
      lastIndexOf in Schnittstelle List<Boolean>
      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(boolean e)
      The indexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      indexOf in Schnittstelle BooleanList
      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(boolean e)
      The lastIndexOf implementation iterates over all elements and compares them to the search value.
      Angegeben von:
      lastIndexOf in Schnittstelle BooleanList
      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
    • swapRemoveBoolean

      public boolean swapRemoveBoolean(boolean e)
      Beschreibung aus Schnittstelle kopiert: BooleanList
      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:
      swapRemoveBoolean in Schnittstelle BooleanList
      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<Boolean>
      Angegeben von:
      equals in Schnittstelle List<Boolean>
      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<Boolean>
      Angegeben von:
      hashCode in Schnittstelle List<Boolean>
      Setzt außer Kraft:
      hashCode in Klasse Object
    • subList

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

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

      public BooleanIterator iterator()
      Beschreibung aus Schnittstelle kopiert: BooleanCollection
      Returns a Type-Specific Iterator to reduce (un)boxing
      Angegeben von:
      iterator in Schnittstelle BooleanCollection
      Angegeben von:
      iterator in Schnittstelle BooleanIterable
      Angegeben von:
      iterator in Schnittstelle Collection<Boolean>
      Angegeben von:
      iterator in Schnittstelle Iterable<Boolean>
      Angegeben von:
      iterator in Schnittstelle List<Boolean>
      Angegeben von:
      iterator in Klasse AbstractBooleanCollection
      Gibt zurück:
      a iterator of the collection
      Siehe auch:
    • listIterator

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

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

      public BooleanListIterator indexedIterator(int... indecies)
      Beschreibung aus Schnittstelle kopiert: BooleanList
      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 BooleanList
      Parameter:
      indecies - that should be used for the iteration.
      Gibt zurück:
      a custom indexed iterator
    • indexedIterator

      public BooleanListIterator indexedIterator(IntList indecies)
      Beschreibung aus Schnittstelle kopiert: BooleanList
      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 BooleanList
      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: BooleanList
      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 BooleanList
      Parameter:
      size - the requested amount of elements/room for elements
    • copy

      public AbstractBooleanList copy()
      Beschreibung aus Schnittstelle kopiert: BooleanCollection
      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 BooleanCollection
      Angegeben von:
      copy in Schnittstelle BooleanList
      Setzt außer Kraft:
      copy in Klasse AbstractBooleanCollection
      Gibt zurück:
      a Shallow Copy of the collection