|
|||||||||
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 Set
size
in class AbstractCollection
public boolean isEmpty()
isEmpty
in interface Set
isEmpty
in class AbstractCollection
public boolean contains(Object o)
contains
in interface Set
contains
in class AbstractCollection
public Iterator iterator()
iterator
in interface Set
iterator
in class AbstractCollection
public boolean add(Object o)
add
in interface Set
add
in class AbstractCollection
public boolean remove(Object o)
remove
in interface Set
remove
in class AbstractCollection
public void clear()
clear
in interface Set
clear
in class AbstractCollection
public PoComparator comparator()
Poset
null
if it uses the elements' natural
ordering.comparator
in interface Poset
org.favabeans.util.Poset
null
if none is
defined.public Object least()
Poset
least
in interface Poset
org.favabeans.util.Poset
null
if no least
element exists.NoSuchElementException
- if this set is empty.public Object greatest()
Poset
greatest
in interface Poset
org.favabeans.util.Poset
null
if no least
element exists.NoSuchElementException
- if this set is empty.public Set minimal()
Poset
minimal
in interface Poset
org.favabeans.util.Poset
NoSuchElementException
- if this set is empty.public Set maximal()
Poset
maximal
in interface Poset
org.favabeans.util.Poset
NoSuchElementException
- if this set is empty.public Set directLessers(Object o)
Poset
directLessers
in interface Poset
org.favabeans.util.Poset
x
- the object for which to obtain the greaters, which may
or may not be in the set.x
.public Set directGreaters(Object o)
Poset
directGreaters
in interface Poset
org.favabeans.util.Poset
x
- the object for which to obtain the greaters, which may
or may not be in the set.x
.public Poset lessers(Object o)
Poset
lessers
in interface Poset
org.favabeans.util.Poset
x
- 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)
Poset
greaters
in interface Poset
org.favabeans.util.Poset
x
- 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 |