Klasse AbstractCharCollection

java.lang.Object
java.util.AbstractCollection<Character>
speiger.src.collections.chars.collections.AbstractCharCollection
Alle implementierten Schnittstellen:
Iterable<Character>, Collection<Character>, CharCollection, CharIterable, ISizeProvider
Bekannte direkte Unterklassen:
AbstractCharList, AbstractCharSet, CharCollections.EmptyCollection

public abstract class AbstractCharCollection extends AbstractCollection<Character> implements CharCollection
Abstract Type Specific Collection that reduces boxing/unboxing
  • Konstruktordetails

    • AbstractCharCollection

      public AbstractCharCollection()
  • Methodendetails

    • iterator

      public abstract 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>
      Angegeben von:
      iterator in Klasse AbstractCollection<Character>
      Gibt zurück:
      a iterator of the collection
      Siehe auch:
    • add

      @Deprecated public boolean add(Character 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 CharCollection
      Angegeben von:
      add in Schnittstelle Collection<Character>
      Setzt außer Kraft:
      add in Klasse AbstractCollection<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
    • 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
    • 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 CharCollection
      Angegeben von:
      contains in Schnittstelle Collection<Character>
      Setzt außer Kraft:
      contains in Klasse AbstractCollection<Character>
    • contains

      public boolean contains(char 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 CharCollection
      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 Character> 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<Character>
      Setzt außer Kraft:
      addAll in Klasse AbstractCollection<Character>
    • containsAll

      public boolean containsAll(CharCollection 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 CharCollection
      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<Character>
      Setzt außer Kraft:
      containsAll in Klasse AbstractCollection<Character>
    • 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 CharCollection
      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(CharCollection c)
      This implementation iterates over the elements of the collection and checks if they are stored in this collection.
      Angegeben von:
      containsAny in Schnittstelle CharCollection
      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 CharCollection
      Angegeben von:
      remove in Schnittstelle Collection<Character>
      Setzt außer Kraft:
      remove in Klasse AbstractCollection<Character>
    • remChar

      public boolean remChar(char 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:
      remChar in Schnittstelle CharCollection
      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(CharCollection 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 CharCollection
      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(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)
      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 CharCollection
      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(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:
    • toCharArray

      public char[] toCharArray()
      A Type-Specific implementation of toArray that links to 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)
      A Type-Specific implementation of toArray. This implementation iterates over all elements and unwraps them into primitive type.
      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: