|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--org.favabeans.util.DagPoset
A DagPoset is an implementation of a
Poset based on a directed acyclic graph data
structure.
| Constructor Summary | |
DagPoset()
|
|
DagPoset(PoComparator comparator)
|
|
| Method Summary | |
boolean |
add(Object o)
|
void |
clear()
|
PoComparator |
comparator()
Return the comparator associated with this partially ordered set, or null if it uses the elements' natural
ordering. |
boolean |
contains(Object o)
|
Set |
directGreaters(Object o)
Obtain the direct greaters of a given object. |
Set |
directLessers(Object o)
Obtain the direct lessers of a given object. |
Poset |
greaters(Object o)
Obtain the greaters of a given object. |
Object |
greatest()
Obtain the greatest element of the set. |
boolean |
isEmpty()
|
Iterator |
iterator()
|
Object |
least()
Obtain the least element of the set. |
Poset |
lessers(Object o)
Obtain the lessers of a given object. |
Set |
maximal()
Obtain the maximal elements of the set. |
Set |
minimal()
Obtain the minimal elements of the set. |
void |
printContents(OutputStream outputStream)
Print the contents of this DagPoset in a
newline-formatted fashion onto a supplied
OutputStream using the default character encoding. |
void |
printContents(PrintWriter printWriter)
Print the contents of this DagPoset in a
newline-formatted fashion onto a supplied
PrintWriter. |
boolean |
remove(Object o)
|
int |
size()
|
| Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
public DagPoset()
public DagPoset(PoComparator comparator)
| Method Detail |
public int size()
size in interface Setsize in class AbstractCollectionpublic boolean isEmpty()
isEmpty in interface SetisEmpty in class AbstractCollectionpublic boolean contains(Object o)
contains in interface Setcontains in class AbstractCollectionpublic Iterator iterator()
iterator in interface Setiterator in class AbstractCollectionpublic boolean add(Object o)
add in interface Setadd in class AbstractCollectionpublic boolean remove(Object o)
remove in interface Setremove in class AbstractCollectionpublic void clear()
clear in interface Setclear in class AbstractCollectionpublic PoComparator comparator()
Posetnull if it uses the elements' natural
ordering.comparator in interface Posetorg.favabeans.util.Posetnull if none is
defined.public Object least()
Posetleast in interface Posetorg.favabeans.util.Posetnull if no least
element exists.NoSuchElementException - if this set is empty.public Object greatest()
Posetgreatest in interface Posetorg.favabeans.util.Posetnull if no least
element exists.NoSuchElementException - if this set is empty.public Set minimal()
Posetminimal in interface Posetorg.favabeans.util.PosetNoSuchElementException - if this set is empty.public Set maximal()
Posetmaximal in interface Posetorg.favabeans.util.PosetNoSuchElementException - if this set is empty.public Set directLessers(Object o)
PosetdirectLessers in interface Posetorg.favabeans.util.Posetx - the object for which to obtain the greaters, which may
or may not be in the set.x.public Set directGreaters(Object o)
PosetdirectGreaters in interface Posetorg.favabeans.util.Posetx - the object for which to obtain the greaters, which may
or may not be in the set.x.public Poset lessers(Object o)
Posetlessers in interface Posetorg.favabeans.util.Posetx - the object for which to obtain the greaters, which may
or may not be in the set.Poset containing the lessers of
x.public Poset greaters(Object o)
Posetgreaters in interface Posetorg.favabeans.util.Posetx - the object for which to obtain the greaters, which may
or may not be in the set.Poset containing the greaters of
x.public void printContents(OutputStream outputStream)
DagPoset in a
newline-formatted fashion onto a supplied
OutputStream using the default character encoding.
This is useful for debugging.outputStream - an OutputStream onto which the
output will be printed.public void printContents(PrintWriter printWriter)
DagPoset in a
newline-formatted fashion onto a supplied
PrintWriter. This is useful for debugging.printWriter - a PrintWriter onto which the
output will be printed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||