Klasse ShortCollections.SynchronizedCollection

java.lang.Object
speiger.src.collections.shorts.utils.ShortCollections.SynchronizedCollection
Alle implementierten Schnittstellen:
Iterable<Short>, Collection<Short>, ShortCollection, ShortIterable, ISizeProvider
Umschließende Klasse:
ShortCollections

public static class ShortCollections.SynchronizedCollection extends Object implements ShortCollection
Synchronized Collection Wrapper for the synchronizedCollection function
  • Methodendetails

    • add

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

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

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

      @Deprecated public boolean containsAny(Collection<?> c)
      Veraltet.
      Beschreibung aus Schnittstelle kopiert: ShortCollection
      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 ShortCollection
      Parameter:
      c - the collection of elements that should be tested for
      Gibt zurück:
      true if any element was found.
    • containsAll

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

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

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

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

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

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

      Angegeben von:
      remove in Schnittstelle Collection<Short>
      Angegeben von:
      remove in Schnittstelle ShortCollection
    • removeAll

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

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

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

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

      Removes elements that were selected by the filter

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

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

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

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

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

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

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

      Angegeben von:
      forEach in Schnittstelle Iterable<Short>
      Angegeben von:
      forEach in Schnittstelle ShortIterable
    • forEachIndexed

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

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

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

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

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

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

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

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