Klasse AbstractLongCollection

java.lang.Object
java.util.AbstractCollection<Long>
speiger.src.collections.longs.collections.AbstractLongCollection
Alle implementierten Schnittstellen:
Iterable<Long>, Collection<Long>, LongCollection, LongIterable, ISizeProvider
Bekannte direkte Unterklassen:
AbstractLongList, AbstractLongSet, LongCollections.EmptyCollection

public abstract class AbstractLongCollection extends AbstractCollection<Long> implements LongCollection
Abstract Type Specific Collection that reduces boxing/unboxing
  • Konstruktordetails

    • AbstractLongCollection

      public AbstractLongCollection()
  • Methodendetails

    • iterator

      public abstract LongIterator iterator()
      Beschreibung aus Schnittstelle kopiert: LongCollection
      Returns a Type-Specific Iterator to reduce (un)boxing
      Angegeben von:
      iterator in Schnittstelle Collection<Long>
      Angegeben von:
      iterator in Schnittstelle Iterable<Long>
      Angegeben von:
      iterator in Schnittstelle LongCollection
      Angegeben von:
      iterator in Schnittstelle LongIterable
      Angegeben von:
      iterator in Klasse AbstractCollection<Long>
      Gibt zurück:
      a iterator of the collection
      Siehe auch:
    • add

      @Deprecated public boolean add(Long e)
      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:
      add in Schnittstelle Collection<Long>
      Angegeben von:
      add in Schnittstelle LongCollection
      Setzt außer Kraft:
      add in Klasse AbstractCollection<Long>
    • addAll

      public boolean addAll(LongCollection c)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific addAll function to reduce (un)boxing
      Angegeben von:
      addAll in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be added
      Gibt zurück:
      true if elements were added into the collection
    • copy

      public LongCollection copy()
      Beschreibung aus Schnittstelle kopiert: LongCollection
      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 LongCollection
      Gibt zurück:
      a Shallow Copy of the collection
    • contains

      @Deprecated public boolean contains(Object e)
      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:
      contains in Schnittstelle Collection<Long>
      Angegeben von:
      contains in Schnittstelle LongCollection
      Setzt außer Kraft:
      contains in Klasse AbstractCollection<Long>
    • contains

      public boolean contains(long e)
      A Type-Specific implementation of contains. This implementation iterates over the elements and returns true if the value match.
      Angegeben von:
      contains in Schnittstelle LongCollection
      Parameter:
      e - the element that should be searched for.
      Gibt zurück:
      true if the value was found.
    • addAll

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

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

      Angegeben von:
      addAll in Schnittstelle Collection<Long>
      Setzt außer Kraft:
      addAll in Klasse AbstractCollection<Long>
    • containsAll

      public boolean containsAll(LongCollection c)
      A Type-Specific implementation of containsAll. This implementation iterates over all elements and checks all elements are present in the other collection.
      Angegeben von:
      containsAll in Schnittstelle LongCollection
      Parameter:
      c - the collection that should be checked if it contains all elements.
      Gibt zurück:
      true if all elements were found in the collection
      Löst aus:
      NullPointerException - if the collection is null
    • containsAll

      public boolean containsAll(Collection<?> c)
      Angegeben von:
      containsAll in Schnittstelle Collection<Long>
      Setzt außer Kraft:
      containsAll in Klasse AbstractCollection<Long>
    • containsAny

      @Deprecated public boolean containsAny(Collection<?> c)
      Veraltet.
      This implementation iterates over the elements of the collection and checks if they are stored in this collection
      Angegeben von:
      containsAny in Schnittstelle LongCollection
      Parameter:
      c - the elements that should be checked for
      Gibt zurück:
      true if any element is in this collection
      Löst aus:
      NullPointerException - if the collection is null
    • containsAny

      public boolean containsAny(LongCollection c)
      This implementation iterates over the elements of the collection and checks if they are stored in this collection.
      Angegeben von:
      containsAny in Schnittstelle LongCollection
      Parameter:
      c - the elements that should be checked for
      Gibt zurück:
      true if any element is in this collection
      Löst aus:
      NullPointerException - if the collection is null
    • remove

      @Deprecated public boolean remove(Object e)
      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:
      remove in Schnittstelle Collection<Long>
      Angegeben von:
      remove in Schnittstelle LongCollection
      Setzt außer Kraft:
      remove in Klasse AbstractCollection<Long>
    • remLong

      public boolean remLong(long e)
      A Type-Specific implementation of remove. This implementation iterates over the elements until it finds the element that is searched for or it runs out of elements. It stops after finding the first element
      Angegeben von:
      remLong in Schnittstelle LongCollection
      Parameter:
      e - the element that is searched for
      Gibt zurück:
      true if the element was found and removed.
      Siehe auch:
    • removeAll

      public boolean removeAll(LongCollection c)
      A Type-Specific implementation of removeAll. This Implementation iterates over all elements and removes them as they were found in the other collection.
      Angegeben von:
      removeAll in Schnittstelle LongCollection
      Parameter:
      c - the elements that should be deleted
      Gibt zurück:
      true if the collection was modified.
      Löst aus:
      NullPointerException - if the collection is null
      Siehe auch:
    • removeAll

      public boolean removeAll(LongCollection c, LongConsumer r)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific removeAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.
      Angegeben von:
      removeAll in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be removed
      r - elements that got removed
      Gibt zurück:
      true if any element was removed
      Siehe auch:
    • retainAll

      public boolean retainAll(LongCollection c)
      A Type-Specific implementation of retainAll. This Implementation iterates over all elements and removes them as they were not found in the other collection.
      Angegeben von:
      retainAll in Schnittstelle LongCollection
      Parameter:
      c - the elements that should be kept
      Gibt zurück:
      true if the collection was modified.
      Löst aus:
      NullPointerException - if the collection is null
      Siehe auch:
    • retainAll

      public boolean retainAll(LongCollection c, LongConsumer r)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific retainAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.
      Angegeben von:
      retainAll in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be kept
      r - elements that got removed
      Gibt zurück:
      true if any element was removed
      Siehe auch:
    • toLongArray

      public long[] toLongArray()
      A Type-Specific implementation of toArray that links to toLongArray(long[]) with a newly created array.
      Angegeben von:
      toLongArray in Schnittstelle LongCollection
      Angegeben von:
      toLongArray in Schnittstelle LongIterable
      Gibt zurück:
      an array containing all of the elements in this collection
      Siehe auch:
    • toLongArray

      public long[] toLongArray(long[] a)
      A Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.
      Angegeben von:
      toLongArray in Schnittstelle LongCollection
      Parameter:
      a - array that the elements should be injected to. If null or to small a new array with the right size is created
      Gibt zurück:
      an array containing all of the elements in this collection
      Siehe auch: