de.rwth.domains.templates
Class LiftedPOSet

java.lang.Object
  |
  +--de.rwth.domains.templates.LiftedPOSet
All Implemented Interfaces:
POSet, Set
Direct Known Subclasses:
LiftedCompleteLattice, LiftedCompletePOSet

public class LiftedPOSet
extends java.lang.Object
implements POSet

Class for the creation of lifted partially ordered sets, which are partially ordered sets with an unique additional least element.

Version:
$Id: LiftedPOSet.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen

Inner classes inherited from class de.rwth.domains.Set
Set.Default
 
Field Summary
protected  java.lang.Object bottom
          The unique new bottom element of this lifted partially ordered set.
protected  POSet poset
          The underlying partially ordered set.
 
Constructor Summary
LiftedPOSet(POSet poset)
          Lifts an existing partially ordered set by adding a new unique least element.
LiftedPOSet(POSet poset, java.lang.Object bottom)
          Lifts an existing partially ordered set by adding a new unique least element.
LiftedPOSet(POSet poset, java.lang.String botlabel)
          Lifts an existing partially ordered set by adding a new unique least element.
 
Method Summary
 boolean equals(java.lang.Object e1, java.lang.Object e2)
          Returns true either if both e1 and e2 are the unique least element of this set of they are equal in the underlying set.
 boolean isElement(java.lang.Object e)
          Returns true if e is the unique least element of this set or if e is element of the underlying set.
 java.util.Iterator iterator()
          Returns an Iterator of the elements of this set, staring with the unique least element.
 java.util.Iterator iteratorSkel()
          Returns an Iterator of the elements of this set, staring with the unique least element.
 boolean le(java.lang.Object e1, java.lang.Object e2)
          Returns true either if e1 is the unique least element of this set or if e1 is less or equal than e2 in the underlying set.
 boolean lt(java.lang.Object e1, java.lang.Object e2)
          Returns true either if e1 is the unique least element of this set and e2 is not or if e1 is less than e2 in the underlying set.
static void main(java.lang.String[] args)
          Mini test environment.
 long size()
          Returns the size of the set.
 long sizeSkel()
          Returns the size of the set skeleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

poset

protected POSet poset
The underlying partially ordered set.

bottom

protected java.lang.Object bottom
The unique new bottom element of this lifted partially ordered set.
Constructor Detail

LiftedPOSet

public LiftedPOSet(POSet poset,
                   java.lang.Object bottom)
Lifts an existing partially ordered set by adding a new unique least element.
Parameters:
poset - the partially ordered set to be lifted

LiftedPOSet

public LiftedPOSet(POSet poset,
                   java.lang.String botlabel)
Lifts an existing partially ordered set by adding a new unique least element.
Parameters:
poset - the partially ordered set to be lifted

LiftedPOSet

public LiftedPOSet(POSet poset)
Lifts an existing partially ordered set by adding a new unique least element.
Parameters:
poset - the partially ordered set to be lifted
Method Detail

equals

public boolean equals(java.lang.Object e1,
                      java.lang.Object e2)
Returns true either if both e1 and e2 are the unique least element of this set of they are equal in the underlying set.
Specified by:
equals in interface Set
Parameters:
e1 - a value of type Object
e2 - a value of type Object
Returns:
true if e1 and e2 are equal in this set.

lt

public boolean lt(java.lang.Object e1,
                  java.lang.Object e2)
Returns true either if e1 is the unique least element of this set and e2 is not or if e1 is less than e2 in the underlying set.
Specified by:
lt in interface POSet
Parameters:
e1 - a value of type Object
e2 - a value of type Object
Returns:
true if e1 is less than e2 in this set.

le

public boolean le(java.lang.Object e1,
                  java.lang.Object e2)
Returns true either if e1 is the unique least element of this set or if e1 is less or equal than e2 in the underlying set.
Specified by:
le in interface POSet
Parameters:
e1 - a value of type Object
e2 - a value of type Object
Returns:
true if e1 is less than or equal than e2 in this set.

size

public long size()
Returns the size of the set.
Specified by:
size in interface Set
Returns:
-1 if the underlying set has an infinite number of elements and one more than the size reported by the underlying set otherwise.

iterator

public java.util.Iterator iterator()
Returns an Iterator of the elements of this set, staring with the unique least element.
Specified by:
iterator in interface Set
Returns:
an Iterator of all elements of this set.

sizeSkel

public long sizeSkel()
Returns the size of the set skeleton.
Specified by:
sizeSkel in interface Set
Returns:
-1 if the underlying set does not have a skeleton and one more than the size reported by the underlying set otherwise.

iteratorSkel

public java.util.Iterator iteratorSkel()
Returns an Iterator of the elements of this set, staring with the unique least element.
Specified by:
iteratorSkel in interface Set
Returns:
an Iterator of all elements of this set.

isElement

public boolean isElement(java.lang.Object e)
Returns true if e is the unique least element of this set or if e is element of the underlying set.
Specified by:
isElement in interface Set
Parameters:
e - a value of type Object
Returns:
a value of type boolean

main

public static void main(java.lang.String[] args)
Mini test environment.
Parameters:
args - a String[] value