org.favabeans.util
Interface Poset

All Superinterfaces:
Collection, Set
All Known Implementing Classes:
DagPoset

public interface Poset
extends Set

A Poset is a partially ordered set.

See Also:
PoComparable

Method Summary
 PoComparator comparator()
          Return the comparator associated with this partially ordered set, or null if it uses the elements' natural ordering.
 Set directGreaters(Object x)
          Obtain the direct greaters of a given object.
 Set directLessers(Object x)
          Obtain the direct lessers of a given object.
 Poset greaters(Object x)
          Obtain the greaters of a given object.
 Object greatest()
          Obtain the greatest element of the set.
 Object least()
          Obtain the least element of the set.
 Poset lessers(Object x)
          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.
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

comparator

public PoComparator comparator()
Return the comparator associated with this partially ordered set, or null if it uses the elements' natural ordering.
Returns:
the comparator, or null if none is defined.

least

public Object least()
Obtain the least element of the set.
Returns:
the least element, or null if no least element exists.
Throws:
NoSuchElementException - if this set is empty.

greatest

public Object greatest()
Obtain the greatest element of the set.
Returns:
the greatest element, or null if no least element exists.
Throws:
NoSuchElementException - if this set is empty.

minimal

public Set minimal()
Obtain the minimal elements of the set.
Returns:
the minimal elements.
Throws:
NoSuchElementException - if this set is empty.

maximal

public Set maximal()
Obtain the maximal elements of the set.
Returns:
the maximal elements.
Throws:
NoSuchElementException - if this set is empty.

directLessers

public Set directLessers(Object x)
Obtain the direct lessers of a given object.
Parameters:
x - the object for which to obtain the greaters, which may or may not be in the set.
Returns:
the direct lessers of x.

directGreaters

public Set directGreaters(Object x)
Obtain the direct greaters of a given object.
Parameters:
x - the object for which to obtain the greaters, which may or may not be in the set.
Returns:
the direct greaters of x.

lessers

public Poset lessers(Object x)
Obtain the lessers of a given object.
Parameters:
x - the object for which to obtain the greaters, which may or may not be in the set.
Returns:
a new Poset containing the lessers of x.

greaters

public Poset greaters(Object x)
Obtain the greaters of a given object.
Parameters:
x - the object for which to obtain the greaters, which may or may not be in the set.
Returns:
a new Poset containing the greaters of x.


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.