Klasse DoubleCollections.UnmodifiableCollection

java.lang.Object
speiger.src.collections.doubles.utils.DoubleCollections.UnmodifiableCollection
Alle implementierten Schnittstellen:
Iterable<Double>, Collection<Double>, DoubleCollection, DoubleIterable, ISizeProvider
Bekannte direkte Unterklassen:
DoubleSets.UnmodifiableSet
Umschließende Klasse:
DoubleCollections

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

    • add

      public boolean add(double o)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific add function to reduce (un)boxing
      Angegeben von:
      add in Schnittstelle DoubleCollection
      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 Double> c)
      Angegeben von:
      addAll in Schnittstelle Collection<Double>
    • addAll

      public boolean addAll(DoubleCollection c)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific addAll function to reduce (un)boxing
      Angegeben von:
      addAll in Schnittstelle DoubleCollection
      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(double[] e, int offset, int length)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific Array based addAll method to reduce the amount of Wrapping
      Angegeben von:
      addAll in Schnittstelle DoubleCollection
      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(double o)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific contains function to reduce (un)boxing
      Angegeben von:
      contains in Schnittstelle DoubleCollection
      Parameter:
      o - the element that is checked for
      Gibt zurück:
      true if the element is found in the collection
    • containsAll

      public boolean containsAll(DoubleCollection c)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific containsAll function to reduce (un)boxing
      Angegeben von:
      containsAll in Schnittstelle DoubleCollection
      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(DoubleCollection c)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific containsAny function to reduce (un)boxing
      Angegeben von:
      containsAny in Schnittstelle DoubleCollection
      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: DoubleCollection
      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 DoubleCollection
      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<Double>
    • size

      public int size()
      Angegeben von:
      size in Schnittstelle Collection<Double>
      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<Double>
    • iterator

      public DoubleIterator iterator()
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      Returns a Type-Specific Iterator to reduce (un)boxing
      Angegeben von:
      iterator in Schnittstelle Collection<Double>
      Angegeben von:
      iterator in Schnittstelle DoubleCollection
      Angegeben von:
      iterator in Schnittstelle DoubleIterable
      Angegeben von:
      iterator in Schnittstelle Iterable<Double>
      Gibt zurück:
      a iterator of the collection
      Siehe auch:
    • copy

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

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

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

      Angegeben von:
      remove in Schnittstelle Collection<Double>
      Angegeben von:
      remove in Schnittstelle DoubleCollection
    • removeAll

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

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

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

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

      Angegeben von:
      removeIf in Schnittstelle Collection<Double>
      Angegeben von:
      removeIf in Schnittstelle DoubleCollection
    • remDouble

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

      public boolean removeAll(DoubleCollection c)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific removeAll function that reduces (un)boxing.
      Angegeben von:
      removeAll in Schnittstelle DoubleCollection
      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(DoubleCollection c, DoubleConsumer r)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      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 DoubleCollection
      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(DoubleCollection c)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific retainAll function that reduces (un)boxing.
      Angegeben von:
      retainAll in Schnittstelle DoubleCollection
      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(DoubleCollection c, DoubleConsumer r)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      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 DoubleCollection
      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(DoublePredicate filter)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific removeIf function to reduce (un)boxing.

      Removes elements that were selected by the filter

      Angegeben von:
      remIf in Schnittstelle DoubleCollection
      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<Double>
    • toArray

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

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

      public double[] toDoubleArray()
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific toArray function that delegates to DoubleCollection.toDoubleArray(double[]) with a newly created array.
      Angegeben von:
      toDoubleArray in Schnittstelle DoubleCollection
      Angegeben von:
      toDoubleArray in Schnittstelle DoubleIterable
      Gibt zurück:
      an array containing all of the elements in this collection
      Siehe auch:
    • toDoubleArray

      public double[] toDoubleArray(double[] a)
      Beschreibung aus Schnittstelle kopiert: DoubleCollection
      A Type-Specific toArray function that reduces (un)boxing.
      Angegeben von:
      toDoubleArray in Schnittstelle DoubleCollection
      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(DoubleConsumer action)
      Beschreibung aus Schnittstelle kopiert: DoubleIterable
      A Type Specific foreach function that reduces (un)boxing
      Angegeben von:
      forEach in Schnittstelle DoubleIterable
      Parameter:
      action - The action to be performed for each element
      Siehe auch:
    • forEach

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

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

      Angegeben von:
      forEach in Schnittstelle DoubleIterable
      Angegeben von:
      forEach in Schnittstelle Iterable<Double>
    • forEachIndexed

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

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

      public boolean equals(Object obj)
      Angegeben von:
      equals in Schnittstelle Collection<Double>
      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, ObjectDoubleConsumer<E> action)
      Beschreibung aus Schnittstelle kopiert: DoubleIterable
      Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
      Angegeben von:
      forEach in Schnittstelle DoubleIterable
      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(DoublePredicate filter)
      Beschreibung aus Schnittstelle kopiert: DoubleIterable
      Helper function to reduce stream usage that allows to filter for any matches.
      Angegeben von:
      matchesAny in Schnittstelle DoubleIterable
      Parameter:
      filter - that should be applied
      Gibt zurück:
      true if any matches were found
    • matchesNone

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

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

      public double reduce(double identity, DoubleDoubleUnaryOperator operator)
      Beschreibung aus Schnittstelle kopiert: DoubleIterable
      Performs a reduction on the elements of this Iterable
      Angegeben von:
      reduce in Schnittstelle DoubleIterable
      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 double reduce(DoubleDoubleUnaryOperator operator)
      Beschreibung aus Schnittstelle kopiert: DoubleIterable
      Performs a reduction on the elements of this Iterable
      Angegeben von:
      reduce in Schnittstelle DoubleIterable
      Parameter:
      operator - the operation that should be applied
      Gibt zurück:
      the reduction result, returns null value if nothing was found
    • findFirst

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

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