Class TransformSet<E>
java.lang.Object
jadex.collection.CollectionWrapper<E>
jadex.collection.SetWrapper<E>
jadex.common.transformation.traverser.TransformSet<E>
- All Implemented Interfaces:
ITransformableObject,Iterable<E>,Collection<E>,Set<E>
A set that transforms itself, i.e. makes a copy of itself.
This ensures that the serializer has no concurrent access to the base object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe listeners.protected final Objectstatic final StringFields inherited from class jadex.collection.CollectionWrapper
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> coll) voidaddChangeListener(jadex.common.IChangeListener<E> lis) Add a change listener.voidclear()booleanbooleancontainsAll(Collection<?> coll) protected voidentryAdded(E value, int index) An entry was added to the collection.protected voidentryChanged(E oldvalue, E newvalue, int index) An entry was changed in the collection.protected voidentryRemoved(E value, int index) An entry was removed from the collection.booleaninthashCode()booleanisEmpty()iterator()protected voidnotifyListeners(jadex.common.ChangeEvent<E> event) Notify listeners of a change event.booleanbooleanremoveAll(Collection<?> coll) voidremoveChangeListener(jadex.common.IChangeListener<E> lis) Add a change listener.booleanretainAll(Collection<?> coll) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Return a transformed object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Field Details
-
ADDED
- See Also:
-
REMOVED
- See Also:
-
listeners
The listeners. -
mutex
-
-
Constructor Details
-
TransformSet
public TransformSet()Create a new TransformSet.
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
iterator
-
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>- Overrides:
containsAllin classjadex.collection.CollectionWrapper<E>
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
toString
- Overrides:
toStringin classjadex.collection.CollectionWrapper<E>
-
equals
-
hashCode
public int hashCode() -
transform
Return a transformed object.- Specified by:
transformin interfaceITransformableObject- Returns:
- A transformed version of the object.
-
entryAdded
An entry was added to the collection.- Specified by:
entryAddedin classjadex.collection.CollectionWrapper<E>
-
entryRemoved
An entry was removed from the collection.- Specified by:
entryRemovedin classjadex.collection.CollectionWrapper<E>
-
entryChanged
An entry was changed in the collection.- Specified by:
entryChangedin classjadex.collection.CollectionWrapper<E>
-
notifyListeners
Notify listeners of a change event.- Parameters:
event- The event.
-
addChangeListener
Add a change listener.- Parameters:
lis- The listener.
-
removeChangeListener
Add a change listener.- Parameters:
lis- The listener.
-