Klasse CharCollections.UnmodifiableCollection

java.lang.Object
speiger.src.collections.chars.utils.CharCollections.UnmodifiableCollection
Alle implementierten Schnittstellen:
Iterable<Character>, Collection<Character>, CharCollection, CharIterable, ISizeProvider
Bekannte direkte Unterklassen:
CharSets.UnmodifiableSet
Umschließende Klasse:
CharCollections

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

    • add

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

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

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

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

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

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

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

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

      Angegeben von:
      remove in Schnittstelle CharCollection
      Angegeben von:
      remove in Schnittstelle Collection<Character>
    • removeAll

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

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

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

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

      Angegeben von:
      removeIf in Schnittstelle CharCollection
      Angegeben von:
      removeIf in Schnittstelle Collection<Character>
    • remChar

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

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

      Removes elements that were selected by the filter

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

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

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

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

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

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

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

      Angegeben von:
      forEach in Schnittstelle CharIterable
      Angegeben von:
      forEach in Schnittstelle Iterable<Character>
    • forEachIndexed

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

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

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

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

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

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

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

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