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>

public class TransformSet<E> extends jadex.collection.SetWrapper<E> implements ITransformableObject
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 Details

  • Constructor Details

    • TransformSet

      public TransformSet()
      Create a new TransformSet.
  • Method Details

    • size

      public int size()
      Specified by:
      size in interface Collection<E>
      Specified by:
      size in interface Set<E>
      Overrides:
      size in class jadex.collection.CollectionWrapper<E>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<E>
      Specified by:
      isEmpty in interface Set<E>
      Overrides:
      isEmpty in class jadex.collection.CollectionWrapper<E>
    • contains

      public boolean contains(Object o)
      Specified by:
      contains in interface Collection<E>
      Specified by:
      contains in interface Set<E>
      Overrides:
      contains in class jadex.collection.CollectionWrapper<E>
    • toArray

      public Object[] toArray()
      Specified by:
      toArray in interface Collection<E>
      Specified by:
      toArray in interface Set<E>
      Overrides:
      toArray in class jadex.collection.CollectionWrapper<E>
    • toArray

      public <T> T[] toArray(T[] a)
      Specified by:
      toArray in interface Collection<E>
      Specified by:
      toArray in interface Set<E>
      Overrides:
      toArray in class jadex.collection.CollectionWrapper<E>
    • iterator

      public Iterator<E> iterator()
      Specified by:
      iterator in interface Collection<E>
      Specified by:
      iterator in interface Iterable<E>
      Specified by:
      iterator in interface Set<E>
      Overrides:
      iterator in class jadex.collection.CollectionWrapper<E>
    • add

      public boolean add(E e)
      Specified by:
      add in interface Collection<E>
      Specified by:
      add in interface Set<E>
      Overrides:
      add in class jadex.collection.CollectionWrapper<E>
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface Collection<E>
      Specified by:
      remove in interface Set<E>
      Overrides:
      remove in class jadex.collection.CollectionWrapper<E>
    • containsAll

      public boolean containsAll(Collection<?> coll)
      Specified by:
      containsAll in interface Collection<E>
      Specified by:
      containsAll in interface Set<E>
      Overrides:
      containsAll in class jadex.collection.CollectionWrapper<E>
    • addAll

      public boolean addAll(Collection<? extends E> coll)
      Specified by:
      addAll in interface Collection<E>
      Specified by:
      addAll in interface Set<E>
      Overrides:
      addAll in class jadex.collection.CollectionWrapper<E>
    • removeAll

      public boolean removeAll(Collection<?> coll)
      Specified by:
      removeAll in interface Collection<E>
      Specified by:
      removeAll in interface Set<E>
      Overrides:
      removeAll in class jadex.collection.CollectionWrapper<E>
    • retainAll

      public boolean retainAll(Collection<?> coll)
      Specified by:
      retainAll in interface Collection<E>
      Specified by:
      retainAll in interface Set<E>
      Overrides:
      retainAll in class jadex.collection.CollectionWrapper<E>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<E>
      Specified by:
      clear in interface Set<E>
      Overrides:
      clear in class jadex.collection.CollectionWrapper<E>
    • toString

      public String toString()
      Overrides:
      toString in class jadex.collection.CollectionWrapper<E>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Collection<E>
      Specified by:
      equals in interface Set<E>
      Overrides:
      equals in class jadex.collection.CollectionWrapper<E>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Collection<E>
      Specified by:
      hashCode in interface Set<E>
      Overrides:
      hashCode in class jadex.collection.CollectionWrapper<E>
    • transform

      public Object transform()
      Return a transformed object.
      Specified by:
      transform in interface ITransformableObject
      Returns:
      A transformed version of the object.
    • entryAdded

      protected void entryAdded(E value, int index)
      An entry was added to the collection.
      Specified by:
      entryAdded in class jadex.collection.CollectionWrapper<E>
    • entryRemoved

      protected void entryRemoved(E value, int index)
      An entry was removed from the collection.
      Specified by:
      entryRemoved in class jadex.collection.CollectionWrapper<E>
    • entryChanged

      protected void entryChanged(E oldvalue, E newvalue, int index)
      An entry was changed in the collection.
      Specified by:
      entryChanged in class jadex.collection.CollectionWrapper<E>
    • notifyListeners

      protected void notifyListeners(jadex.common.ChangeEvent<E> event)
      Notify listeners of a change event.
      Parameters:
      event - The event.
    • addChangeListener

      public void addChangeListener(jadex.common.IChangeListener<E> lis)
      Add a change listener.
      Parameters:
      lis - The listener.
    • removeChangeListener

      public void removeChangeListener(jadex.common.IChangeListener<E> lis)
      Add a change listener.
      Parameters:
      lis - The listener.