mascoptLib.abstractGraph
Class AbstractVertexSet

java.lang.Object
  extended bymascoptLib.util.ObservableObject
      extended bymascoptLib.abstractGraph.MascoptObject
          extended bymascoptLib.abstractGraph.MascoptFixedSet
              extended bymascoptLib.abstractGraph.MascoptSet
                  extended bymascoptLib.abstractGraph.AbstractVertexSet
All Implemented Interfaces:
Cloneable, Collection, MascoptObjectInterface, Observer, Set
Direct Known Subclasses:
VertexSet

public abstract class AbstractVertexSet
extends MascoptSet

The AbstractVertexSet class is derivated from MascoptSet. It allow to group AbstractVertex objects in a set.


Field Summary
 
Fields inherited from class mascoptLib.abstractGraph.MascoptFixedSet
initialCapacity, loadFactor
 
Constructor Summary
AbstractVertexSet()
          Default Constructor.
AbstractVertexSet(AbstractVertexSet superSet)
          Constructor creating a sub set of the VertexSet.
AbstractVertexSet(AbstractVertexSet originalSet, boolean copyElements)
          Constructor for copy sets.
 
Method Summary
 boolean add(AbstractVertex o)
          Add a vertex in the set.
static long countAllAbstractVertexSets()
          Counts the number of vertex sets.
abstract  AbstractVertexSetFactory getFactory()
          Give the factory creating objects not abstract.
 boolean remove(AbstractVertex o)
          Remove a vertex in the set.
 void update(Observable o, Object arg)
          For the library coherence.
 
Methods inherited from class mascoptLib.abstractGraph.MascoptSet
add, add, addAll, clear, remove, remove, removeAll, removeAllValues, removeAllValuesOnElementsOfset, retainAll, setValueForAllElements, setValueForAllElements
 
Methods inherited from class mascoptLib.abstractGraph.MascoptFixedSet
contains, containsAll, countAllSets, equals, free, getSuperSet, hashCode, isEmpty, isSubSet, iterator, setSuperSet, size, toArray, toArray, toArray, toString
 
Methods inherited from class mascoptLib.abstractGraph.MascoptObject
copyValues, countAllObjects, deleteValue, deleteValue, existValue, existValue, getDoubleValue, getDoubleValue, getDouValue, getDouValue, getId, getIntegerValue, getIntegerValue, getIntValue, getIntValue, getName, getValue, getValue, getValueContexts, getValueDataType, getValueDataType, getValueEntries, notifyOnValueChange, setDoubleValue, setDoubleValue, setDouValue, setDouValue, setIntegerValue, setIntegerValue, setIntValue, setIntValue, setName, setValue, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from class mascoptLib.util.ObservableObject
addAddObserver, addRemoveObserver, addValueObserver, countAddObservers, countRemoveObservers, countValueObservers, deleteAddObserver, deleteAddObserver, deleteRemoveObserver, deleteRemoveObserver, deleteValueObserver, deleteValueObserver
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray
 

Constructor Detail

AbstractVertexSet

public AbstractVertexSet()
Default Constructor.


AbstractVertexSet

public AbstractVertexSet(AbstractVertexSet superSet)
Constructor creating a sub set of the VertexSet. The sub set created contains no elements of the superSet. The set can easily be filled with the method add or addAll.

Parameters:
superSet - the set of vertex on which is based the vertex set created.

AbstractVertexSet

public AbstractVertexSet(AbstractVertexSet originalSet,
                         boolean copyElements)
Constructor for copy sets. Creates a new AbstractVertexSet similar to originalSet. If copyElements is set to true then all the elements of originalSet are duplicated (and of course their id is changed) and the structure of the set is preserved (there exists an isomorphism between originalSet and the new set). In that case, the simple values are also copied, but those depending on a context are dropped. If copyElements is set to false, then the new set's elements point to those of originalSet but the set is not a subset of originalSet.

Parameters:
originalSet - - the set to be copied.
copyElements - - indicates if the elements of the set have to be duplicated
Method Detail

getFactory

public abstract AbstractVertexSetFactory getFactory()
Give the factory creating objects not abstract. As all the library is abstract, we need a factory that determines the type of graphs the user manipulates. Then the factory is able to create each type of object when necessary.


update

public void update(Observable o,
                   Object arg)
For the library coherence. Behavior of vertex set when other objects changes

Specified by:
update in interface Observer
Overrides:
update in class MascoptObject
Parameters:
o - an Observable value
arg - an Object value

add

public boolean add(AbstractVertex o)
Add a vertex in the set.

Parameters:
o - the vertex that must be added in the set.
Returns:
true if the vertex has been added in the set.

remove

public boolean remove(AbstractVertex o)
Remove a vertex in the set.

Parameters:
o - the vertex that must be removed in the set.
Returns:
true if the vertex has been removed in the set.

countAllAbstractVertexSets

public static long countAllAbstractVertexSets()
Counts the number of vertex sets.