mascoptLib.abstractGraph
Class MascoptSet

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

public abstract class MascoptSet
extends MascoptFixedSet
implements Set

This class implements the concept of MascoptSet. A new implementation was needed in order to comply more closely with the object oriented way of doing things. Basically, a MascoptSet object is a MascoptObject object which contains a Hashset to store objects.


Field Summary
 
Fields inherited from class mascoptLib.abstractGraph.MascoptFixedSet
initialCapacity, loadFactor
 
Constructor Summary
MascoptSet()
          Default constructor of a set.
MascoptSet(MascoptSet superSet)
          Constuctor for subsets.
 
Method Summary
 boolean add(MascoptObject mascoptobject)
          Describe add method here.
 boolean add(Object object)
          Describe add method here.
 boolean addAll(Collection collection)
          Describe addAll method here.
 void clear()
          Describe clear method here.
 boolean remove(MascoptObject mascoptobject)
          Describe remove method here.
 boolean remove(Object object)
          Describe remove method here.
 boolean removeAll(Collection collection)
          Describe removeAll method here.
 void removeAllValues(MascoptObjectInterface context)
          Remove all values concerning a category.
 void removeAllValuesOnElementsOfset(MascoptObjectInterface context)
          Remove all values concerning a category.
 boolean retainAll(Collection collection)
          Describe retainAll method here.
 void setValueForAllElements(String name, String value)
          Write values in the set for all elements.
 void setValueForAllElements(String name, String value, MascoptObjectInterface g)
          Write values in the set for all elements.
 
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, update
 
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

MascoptSet

public MascoptSet()
Default constructor of a set.


MascoptSet

public MascoptSet(MascoptSet superSet)
Constuctor for subsets. Use a superset to construct a subset. The subset will be empty. The set can easily be filled with the method add or addAll.

Parameters:
superSet - the super set to use.
Method Detail

addAll

public boolean addAll(Collection collection)
Describe addAll method here.

Specified by:
addAll in interface Set
Overrides:
addAll in class MascoptFixedSet
Parameters:
collection - a Collection value
Returns:
a boolean value

add

public boolean add(Object object)
Describe add method here.

Specified by:
add in interface Set
Overrides:
add in class MascoptFixedSet
Returns:
a boolean value

add

public boolean add(MascoptObject mascoptobject)
Describe add method here.

Parameters:
mascoptobject - a MascoptObject value
Returns:
a boolean value

remove

public boolean remove(Object object)
Describe remove method here.

Specified by:
remove in interface Set
Overrides:
remove in class MascoptFixedSet
Parameters:
object - a Object value
Returns:
a boolean value

remove

public boolean remove(MascoptObject mascoptobject)
Describe remove method here.

Returns:
a boolean value

clear

public void clear()
Describe clear method here.

Specified by:
clear in interface Set
Overrides:
clear in class MascoptFixedSet

removeAll

public boolean removeAll(Collection collection)
Describe removeAll method here.

Specified by:
removeAll in interface Set
Overrides:
removeAll in class MascoptFixedSet
Parameters:
collection - a Collection value
Returns:
a boolean value

retainAll

public boolean retainAll(Collection collection)
Describe retainAll method here.

Specified by:
retainAll in interface Set
Overrides:
retainAll in class MascoptFixedSet
Parameters:
collection - a Collection value
Returns:
a boolean value

setValueForAllElements

public void setValueForAllElements(String name,
                                   String value)
Write values in the set for all elements. This values are global (no context).

Parameters:
name - the string reprensenting the parameter
value - the value to write for this parameter

setValueForAllElements

public void setValueForAllElements(String name,
                                   String value,
                                   MascoptObjectInterface g)
Write values in the set for all elements. This values are contexted by a graph.

Parameters:
name - the string reprensenting the parameter
value - the value to write for this parameter
g - the graph representing the context

removeAllValuesOnElementsOfset

public void removeAllValuesOnElementsOfset(MascoptObjectInterface context)
Remove all values concerning a category. This method is usefull when some values used in an algorithm are no more needed. If you omit to remove the values, the object continues to have a pointer on the context. Then the context cannot be destroyed because a value points on it. Think about be sure to remove all values pointing on a context to free memory.

Parameters:
context - the oject context

removeAllValues

public void removeAllValues(MascoptObjectInterface context)
Remove all values concerning a category. This method is usefull when some values used in an algorithm are no more needed. If you omit to remove the values, the object continues to have a pointer on the context. Then the context cannot be destroyed because a value points on it. Think about be sure to remove all values pointing on a context to free memory.

Overrides:
removeAllValues in class MascoptObject
Parameters:
context - the oject context