|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.graph.GraphElementSet
A set of GraphElement.
The implementation uses the java.util.LinkedHashSet class to maintain the insertion-order.
| Constructor Summary | |
GraphElementSet()
Creates a new, empty set. |
|
GraphElementSet(GraphElementList list)
Creates a new set from a list of graph elements. |
|
GraphElementSet(GraphElementSet set)
Creates a new set from a set of GraphElement elements. |
|
| Method Summary | |
boolean |
add(GraphElement elem)
Appends a graph element to this list. |
void |
clear()
Removes all graph elements from this set. |
boolean |
contains(GraphElement elem)
Tests if this set contains a graph element. |
GraphElementSet |
difference(GraphElementSet set)
Obtains a difference set of this set and a given set. |
boolean |
equals(GraphElementSet set)
Tests if this set is equals to a given set. |
GraphElement |
getGraphElement()
Returns one graph element in this set. |
GraphElementSet |
intersection(GraphElementSet set)
Obtains an intersection set of this set and a given set. |
boolean |
isEmpty()
Tests if this set contains no graph element. |
java.util.Iterator |
iterator()
Returns an iterator of this set in proper sequence. |
void |
print()
Displays information about this set. |
boolean |
remove(GraphElement elem)
Removes a graph element from this set. |
int |
size()
Returns the number of graph elements in this set. |
boolean |
subset(GraphElementSet set)
Tests if this set is a subset of a given set. |
boolean |
subsetEqual(GraphElementSet set)
Tests if this set is a subset of a given set or this set equals to the given set. |
GraphElement[] |
toArray()
Returns an array containing all graph elements in this set in proper sequence. |
GraphElementSet |
union(GraphElementSet set)
Obtains a union set of this set and a given set. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphElementSet()
public GraphElementSet(GraphElementSet set)
GraphElement elements.
set - A set of graph elements.public GraphElementSet(GraphElementList list)
list - A list of graph elements.| Method Detail |
public void clear()
public boolean add(GraphElement elem)
elem - A graph element to be appended.
true if this set changed as a result of the call.public boolean remove(GraphElement elem)
elem - A graph element to be removed.
true if this lispreservet changed as a result of the call.public boolean contains(GraphElement elem)
elem - A graph element to be tested.
true if the graph element is present, otherwise false.public boolean isEmpty()
true if this set contains no graph element, otherwise false.public int size()
public GraphElement getGraphElement()
null if there is no graph element in this set.public java.util.Iterator iterator()
public boolean equals(GraphElementSet set)
set - A set to be tested.
true if both the sets are equal, otherwise false.public GraphElementSet union(GraphElementSet set)
set - A set of graph elements.
public GraphElementSet intersection(GraphElementSet set)
set - A set of graph elements.
public GraphElementSet difference(GraphElementSet set)
set - A set of graph elements.
public boolean subset(GraphElementSet set)
set - A set of graph elements.
true if this set is a subset of the given set, otherwise false.public boolean subsetEqual(GraphElementSet set)
set - A set of graph elements.
true if this set is a subset of the given set or this set equals to the given set, otherwise false.public GraphElement[] toArray()
public void print()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||