- Type Parameters:
E
- The type of the elements being stored in theElements.MutableElements
.
- All Superinterfaces:
org.refcodes.mixin.Clearable
,Elements<E>
,Elements.ClearableElements<E>
- All Known Subinterfaces:
Container.MutableContainer<E>
Extends the
Elements
with mutable (writable) functionality,
especially by enabling the Iterator.remove()
method in the
Iterator
provided via iterator()
and by providing the
add(Object)
and the remove(Object)
methods.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.struct.Elements
Elements.ClearableElements<E>, Elements.MutableElements<E>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Same asCollection.add(Object)
.iterator()
Returns anIterator
instance of all the data elements contained in the container (collection). --------------------------------------------------------------------- ATTENTION: TheIterator.remove()
method is enabled in the returnedIterator
instance as theElements.MutableElements
is possibly readable and writable.boolean
Same asCollection.remove(Object)
.Methods inherited from interface org.refcodes.mixin.Clearable
clear
-
Method Details
-
add
Same asCollection.add(Object)
.- Parameters:
aElement
- the element whose presence in this collection is to be ensured- Returns:
- True if this collection changed as a result of the call
- See Also:
-
remove
Same asCollection.remove(Object)
.- Parameters:
aElement
- The element to be removed from this collection, if present- Returns:
- True if an element was removed as a result of this call.
- See Also:
-
iterator
Returns anIterator
instance of all the data elements contained in the container (collection). --------------------------------------------------------------------- ATTENTION: TheIterator.remove()
method is enabled in the returnedIterator
instance as theElements.MutableElements
is possibly readable and writable.
-