public class DefaultCustomizationCollection<T> extends Object 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.
|
boolean |
addAll(Collection<? extends CustomizationSupplier<T>> c)
Adds all customizations to the collection.
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
isEmpty() |
Iterator<CustomizationSupplier<T>> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public int size()
size
in interface Collection<CustomizationSupplier<T>>
public boolean isEmpty()
isEmpty
in interface Collection<CustomizationSupplier<T>>
public boolean contains(Object o)
contains
in interface Collection<CustomizationSupplier<T>>
public Iterator<CustomizationSupplier<T>> iterator()
iterator
in interface Iterable<CustomizationSupplier<T>>
iterator
in interface Collection<CustomizationSupplier<T>>
public Object[] toArray()
toArray
in interface Collection<CustomizationSupplier<T>>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<CustomizationSupplier<T>>
public boolean add(CustomizationSupplier<T> entry)
add
in interface Collection<CustomizationSupplier<T>>
add
in interface CustomizationCollection<T>
true
IllegalArgumentException
- if the entry is already existing.public boolean remove(Object o)
remove
in interface Collection<CustomizationSupplier<T>>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<CustomizationSupplier<T>>
public boolean addAll(Collection<? extends CustomizationSupplier<T>> c)
CustomizationCollection
addAll
in interface Collection<CustomizationSupplier<T>>
addAll
in interface CustomizationCollection<T>
true
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<CustomizationSupplier<T>>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<CustomizationSupplier<T>>
public void clear()
clear
in interface Collection<CustomizationSupplier<T>>
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.