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 String
The listeners.protected final Object
static final String
Fields inherited from class jadex.collection.CollectionWrapper
delegate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> coll) void
addChangeListener
(jadex.common.IChangeListener<E> lis) Add a change listener.void
clear()
boolean
boolean
containsAll
(Collection<?> coll) protected void
entryAdded
(E value, int index) An entry was added to the collection.protected void
entryChanged
(E oldvalue, E newvalue, int index) An entry was changed in the collection.protected void
entryRemoved
(E value, int index) An entry was removed from the collection.boolean
int
hashCode()
boolean
isEmpty()
iterator()
protected void
notifyListeners
(jadex.common.ChangeEvent<E> event) Notify listeners of a change event.boolean
boolean
removeAll
(Collection<?> coll) void
removeChangeListener
(jadex.common.IChangeListener<E> lis) Add a change listener.boolean
retainAll
(Collection<?> coll) int
size()
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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
- Overrides:
containsAll
in classjadex.collection.CollectionWrapper<E>
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
toString
- Overrides:
toString
in classjadex.collection.CollectionWrapper<E>
-
equals
-
hashCode
public int hashCode() -
transform
Return a transformed object.- Specified by:
transform
in interfaceITransformableObject
- Returns:
- A transformed version of the object.
-
entryAdded
An entry was added to the collection.- Specified by:
entryAdded
in classjadex.collection.CollectionWrapper<E>
-
entryRemoved
An entry was removed from the collection.- Specified by:
entryRemoved
in classjadex.collection.CollectionWrapper<E>
-
entryChanged
An entry was changed in the collection.- Specified by:
entryChanged
in 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.
-