public final class DefaultCustomizationCollection<T> extends AbstractCollection<CustomizationSupplier<T>> implements CustomizationCollection<T>
Rationale: Inserting is a little expansive, since we check whether an entry is already existing. Since there are usually only a few entries the list is sufficient.
Constructor and Description |
---|
DefaultCustomizationCollection() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(CustomizationSupplier<T> entry)
Adds a customization to the collection.
|
Iterator<CustomizationSupplier<T>> |
iterator() |
int |
size() |
String |
toString() |
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll
clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
public int size()
size
in interface Collection<CustomizationSupplier<T>>
size
in class AbstractCollection<CustomizationSupplier<T>>
public Iterator<CustomizationSupplier<T>> iterator()
iterator
in interface Iterable<CustomizationSupplier<T>>
iterator
in interface Collection<CustomizationSupplier<T>>
iterator
in class AbstractCollection<CustomizationSupplier<T>>
public boolean add(CustomizationSupplier<T> entry)
add
in interface Collection<CustomizationSupplier<T>>
add
in interface CustomizationCollection<T>
add
in class AbstractCollection<CustomizationSupplier<T>>
true
IllegalArgumentException
- if the entry is already existing.public String toString()
toString
in class AbstractCollection<CustomizationSupplier<T>>
cache2k API documentation. Copyright © 2000–2020 headissue GmbH, Munich.