public static enum CollectionsExt.Modification extends Enum<CollectionsExt.Modification>
Collection.
A collection is modified either directly or via its iterator's
method Iterator.remove().
The direct modifications split in adding and removing a single object,
clearing the whole collection
and bulk operations like adding, removing, retaining
all objects which are in another Collection.
Subinterfaces of Collection
may offer further kinds of modifications:
SortedSets for example define views on the original set| Enum Constant and Description |
|---|
AddObj
Modification adding an element
which may be by
Collection.add(Object),
Collection.addAll(Collection),
by List.add(int, Object),
List.addAll(int, Collection),
|
RemoveObj
|
SetObj
|
| Modifier and Type | Method and Description |
|---|---|
static CollectionsExt.Modification |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CollectionsExt.Modification[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CollectionsExt.Modification AddObj
Collection.add(Object),
Collection.addAll(Collection),
by List.add(int, Object),
List.addAll(int, Collection),
. * Modification by ListIterator.add(Object)
of (list)-iterator attached with underlying List
via List.listIterator() or List.listIterator(int).
public static final CollectionsExt.Modification RemoveObj
Collection.remove(Object),
Collection.removeAll(Collection),
Collection.retainAll(Collection),
Collection.removeIf(Predicate),
Collection.clear()
and by List.remove(int).
Modification by Iterator.remove()
of iterator attached with underlying Collection
via Collection.iterator(), List.listIterator()
or List.listIterator(int).
public static final CollectionsExt.Modification SetObj
List.set(int, Object),
List.replaceAll(UnaryOperator) and
List.sort(Comparator).
Modification by ListIterator.set(Object)
of iterator attached with underlying List
via List.listIterator() or List.listIterator(int).
public static CollectionsExt.Modification[] values()
for (CollectionsExt.Modification c : CollectionsExt.Modification.values()) System.out.println(c);
public static CollectionsExt.Modification valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2012–2018 Simuline Organization (l2r). All rights reserved.