Klasse LongCollections.UnmodifiableCollection

java.lang.Object
speiger.src.collections.longs.utils.LongCollections.UnmodifiableCollection
Alle implementierten Schnittstellen:
Iterable<Long>, Collection<Long>, LongCollection, LongIterable, ISizeProvider
Bekannte direkte Unterklassen:
LongSets.UnmodifiableSet
Umschließende Klasse:
LongCollections

public static class LongCollections.UnmodifiableCollection extends Object implements LongCollection
Unmodifyable Collection Wrapper for the unmodifyableCollection method
  • Methodendetails

    • add

      public boolean add(long o)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific add function to reduce (un)boxing
      Angegeben von:
      add in Schnittstelle LongCollection
      Parameter:
      o - the element that should be added
      Gibt zurück:
      true if the element was added to the collection
    • addAll

      public boolean addAll(Collection<? extends Long> c)
      Angegeben von:
      addAll in Schnittstelle Collection<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
    • addAll

      public boolean addAll(long[] e, int offset, int length)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific Array based addAll method to reduce the amount of Wrapping
      Angegeben von:
      addAll in Schnittstelle LongCollection
      Parameter:
      e - the elements that should be added
      offset - where to start within the array
      length - how many elements of the array should be added
      Gibt zurück:
      if the collection was modified
    • contains

      public boolean contains(long o)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific contains function to reduce (un)boxing
      Angegeben von:
      contains in Schnittstelle LongCollection
      Parameter:
      o - the element that is checked for
      Gibt zurück:
      true if the element is found in the collection
    • containsAll

      public boolean containsAll(LongCollection c)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific containsAll function to reduce (un)boxing
      Angegeben von:
      containsAll in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be tested for
      Gibt zurück:
      true if all the element is found in the collection
    • containsAny

      public boolean containsAny(LongCollection c)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific containsAny function to reduce (un)boxing
      Angegeben von:
      containsAny in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be tested for
      Gibt zurück:
      true if any element was found
    • containsAny

      @Deprecated public boolean containsAny(Collection<?> c)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: LongCollection
      Returns true if any element of the Collection is found in the provided collection. A Small Optimization function to find out of any element is present when comparing collections and not all of them.
      Angegeben von:
      containsAny in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be tested for
      Gibt zurück:
      true if any element was found.
    • containsAll

      @Deprecated public boolean containsAll(Collection<?> c)
      Veraltet.
      Angegeben von:
      containsAll in Schnittstelle Collection<Long>
    • size

      public int size()
      Angegeben von:
      size in Schnittstelle Collection<Long>
      Angegeben von:
      size in Schnittstelle ISizeProvider
      Gibt zurück:
      the size of the implementing Collection
    • isEmpty

      public boolean isEmpty()
      Angegeben von:
      isEmpty in Schnittstelle Collection<Long>
    • iterator

      public 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
      Gibt zurück:
      a iterator of the collection
      Siehe auch:
    • 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
    • remove

      @Deprecated public boolean remove(Object o)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: LongCollection

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

      Angegeben von:
      remove in Schnittstelle Collection<Long>
      Angegeben von:
      remove in Schnittstelle LongCollection
    • removeAll

      @Deprecated public boolean removeAll(Collection<?> c)
      Veraltet.
      Angegeben von:
      removeAll in Schnittstelle Collection<Long>
    • retainAll

      @Deprecated public boolean retainAll(Collection<?> c)
      Veraltet.
      Angegeben von:
      retainAll in Schnittstelle Collection<Long>
    • removeIf

      @Deprecated public boolean removeIf(Predicate<? super Long> filter)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: LongCollection

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

      Angegeben von:
      removeIf in Schnittstelle Collection<Long>
      Angegeben von:
      removeIf in Schnittstelle LongCollection
    • remLong

      public boolean remLong(long o)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific remove function that reduces (un)boxing.
      Angegeben von:
      remLong in Schnittstelle LongCollection
      Parameter:
      o - the element that should be removed
      Gibt zurück:
      true if the element was removed
      Siehe auch:
    • removeAll

      public boolean removeAll(LongCollection c)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific removeAll function that reduces (un)boxing.
      Angegeben von:
      removeAll in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be removed
      Gibt zurück:
      true if any element was removed
      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)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific retainAll function that reduces (un)boxing.
      Angegeben von:
      retainAll in Schnittstelle LongCollection
      Parameter:
      c - the collection of elements that should be kept
      Gibt zurück:
      true if any element was removed
      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:
    • remIf

      public boolean remIf(LongPredicate filter)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific removeIf function to reduce (un)boxing.

      Removes elements that were selected by the filter

      Angegeben von:
      remIf in Schnittstelle LongCollection
      Parameter:
      filter - Filters the elements that should be removed
      Gibt zurück:
      true if the collection was modified
      Siehe auch:
    • clear

      public void clear()
      Angegeben von:
      clear in Schnittstelle Collection<Long>
    • toArray

      public Object[] toArray()
      Angegeben von:
      toArray in Schnittstelle Collection<Long>
    • toArray

      public <T> T[] toArray(T[] a)
      Angegeben von:
      toArray in Schnittstelle Collection<Long>
    • toLongArray

      public long[] toLongArray()
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific toArray function that delegates to LongCollection.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)
      Beschreibung aus Schnittstelle kopiert: LongCollection
      A Type-Specific toArray function that reduces (un)boxing.
      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:
    • forEach

      public void forEach(LongConsumer action)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      A Type Specific foreach function that reduces (un)boxing
      Angegeben von:
      forEach in Schnittstelle LongIterable
      Parameter:
      action - The action to be performed for each element
      Siehe auch:
    • forEach

      @Deprecated public void forEach(Consumer<? super Long> action)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: LongIterable

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

      Angegeben von:
      forEach in Schnittstelle Iterable<Long>
      Angegeben von:
      forEach in Schnittstelle LongIterable
    • forEachIndexed

      public void forEachIndexed(IntLongConsumer action)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
      Angegeben von:
      forEachIndexed in Schnittstelle LongIterable
      Parameter:
      action - The action to be performed for each element
    • hashCode

      public int hashCode()
      Angegeben von:
      hashCode in Schnittstelle Collection<Long>
      Setzt außer Kraft:
      hashCode in Klasse Object
    • equals

      public boolean equals(Object obj)
      Angegeben von:
      equals in Schnittstelle Collection<Long>
      Setzt außer Kraft:
      equals in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • forEach

      public <E> void forEach(E input, ObjectLongConsumer<E> action)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
      Angegeben von:
      forEach in Schnittstelle LongIterable
      Typparameter:
      E - the generic type of the Object
      Parameter:
      input - the object that should be included
      action - The action to be performed for each element
    • matchesAny

      public boolean matchesAny(LongPredicate filter)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Helper function to reduce stream usage that allows to filter for any matches.
      Angegeben von:
      matchesAny in Schnittstelle LongIterable
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if any matches were found
    • matchesNone

      public boolean matchesNone(LongPredicate filter)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Helper function to reduce stream usage that allows to filter for no matches.
      Angegeben von:
      matchesNone in Schnittstelle LongIterable
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if no matches were found
    • matchesAll

      public boolean matchesAll(LongPredicate filter)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Helper function to reduce stream usage that allows to filter for all matches.
      Angegeben von:
      matchesAll in Schnittstelle LongIterable
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if all matches.
    • reduce

      public long reduce(long identity, LongLongUnaryOperator operator)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Performs a reduction on the elements of this Iterable
      Angegeben von:
      reduce in Schnittstelle LongIterable
      Parameter:
      identity - the start value
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns identity if nothing was found
    • reduce

      public long reduce(LongLongUnaryOperator operator)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Performs a reduction on the elements of this Iterable
      Angegeben von:
      reduce in Schnittstelle LongIterable
      Parameter:
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns null value if nothing was found
    • findFirst

      public long findFirst(LongPredicate filter)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Helper function to reduce stream usage that allows to filter for the first match.
      Angegeben von:
      findFirst in Schnittstelle LongIterable
      Parameter:
      filter - that should be applied
      Gibt zurück:
      the found value or the null equivalent variant.
    • count

      public int count(LongPredicate filter)
      Beschreibung aus Schnittstelle kopiert: LongIterable
      Helper function to reduce stream usage that allows to count the valid elements.
      Angegeben von:
      count in Schnittstelle LongIterable
      Parameter:
      filter - that should be applied
      Gibt zurück:
      the amount of Valid Elements