|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.rwth.domains.templates.StackSet
Class for (maybe infinite) sets which consists of stacks of elements from a set.
Inner classes inherited from class de.rwth.domains.Set |
Set.Default |
Field Summary | |
protected int |
maxSize
The maximal stack size of the elements of this set. |
protected Set |
set
The set for the elements of the stacks of this set. |
protected long |
size
The size of this set. |
protected long |
sizeSkel
The size of this skeleton subset of this set. |
protected int |
skelMaxSize
The maximal stack size of the elements of skeleton subset of this set. |
protected static int |
SKELMAXSIZE
The default value for the maximal stack size for the skeleton subset of this set. |
Constructor Summary | |
StackSet(Set set)
Creates a new StackSet instance with unlimited stack size and
skeleton stack size SKELMAXSIZE. |
|
StackSet(Set set,
int maxSize)
Creates a new StackSet instance with maximal stack size. |
Method Summary | |
protected static long |
computeSize(int maxSize,
long baseSize)
Compute the size of a stack set which maximal maxSize stack size
and baseSize elements for each entry in the stack. |
boolean |
equals(java.lang.Object param1,
java.lang.Object param2)
Checks if two elements of this set are equal. |
boolean |
isElement(java.lang.Object param1)
Checks if an element is contained in this set. |
java.util.Iterator |
iterator()
Returns an Iterator of the elements of this set. |
java.util.Iterator |
iteratorSkel()
Returns an Iterator of the elements of the skeleton subset this
set. |
static void |
main(java.lang.String[] args)
Mini test environment. |
long |
size()
Returns the size of this set. |
long |
sizeSkel()
Returns the size of the skeleton subset of this set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Set set
protected static final int SKELMAXSIZE
protected int maxSize
protected int skelMaxSize
protected long size
protected long sizeSkel
Constructor Detail |
public StackSet(Set set)
StackSet
instance with unlimited stack size and
skeleton stack size SKELMAXSIZE.set
- a Set
valuepublic StackSet(Set set, int maxSize)
StackSet
instance with maximal stack size.set
- a Set
valuemaxSize
- an int
valueMethod Detail |
protected static long computeSize(int maxSize, long baseSize)
maxSize
stack size
and baseSize
elements for each entry in the stack.maxSize
- an int
valuebaseSize
- a long
valuelong
valuepublic boolean equals(java.lang.Object param1, java.lang.Object param2)
Set
equals
is reflexive,
transitive and symmetric. Furthermore, equals(e1,e2)
should
coincide with e1.equals(e2)
.equals
in interface Set
de.rwth.domains.Set
e1
- a value of type Object
e2
- a value of type Object
true
if e1
and e2
belong to this
set and are equal, false
otherwiseDomain.checkProperties(Set set)
public boolean isElement(java.lang.Object param1)
Set
isElement()
is true for all
objects generated by Set.iterator()
and false for all other
objects.isElement
in interface Set
de.rwth.domains.Set
e
- a value of type Object
true
if and only if this set contains this element.Set.iterator()
,
Domain.checkProperties(Set set)
public java.util.Iterator iterator()
Set
Iterator
of the elements of this set.
Set.isElement(Object e)
yields true for all elements.iterator
in interface Set
de.rwth.domains.Set
Iterator
of all elements of this set.Set.isElement(Object e)
,
Domain.checkProperties(Set set)
public java.util.Iterator iteratorSkel()
Set
Iterator
of the elements of the skeleton subset this
set. It maybe null
if there is no skeleton subset.
Set.isElement(Object e)
yields true for all elements.iteratorSkel
in interface Set
de.rwth.domains.Set
Iterator
of all elements of this set.Set.isElement(Object e)
,
Domain.checkProperties(Set set)
public long size()
Set
iterator().hasNext()
can be called.size
in interface Set
de.rwth.domains.Set
Domain.checkProperties(Set set)
public long sizeSkel()
Set
iterator().hasNext()
can be called.sizeSkel
in interface Set
de.rwth.domains.Set
Domain.checkProperties(Set set)
public static void main(java.lang.String[] args)
args
- a String[]
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |