|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.rwth.domains.templates.SimpleSet
Class for the creation of simple sets by explicitly providing all elements.
Inner classes inherited from class de.rwth.domains.Set |
Set.Default |
Field Summary | |
protected java.lang.Object[] |
elements
Contains all elements of this set. |
Constructor Summary | |
SimpleSet()
Creates the empty set. |
|
SimpleSet(int i)
Creates a set with one int as element. |
|
SimpleSet(int[] is)
Creates a set from an array of ints . |
|
SimpleSet(int from,
int to)
Creates a set with a range of elements. |
|
SimpleSet(java.lang.Object o)
Creates a set with one element. |
|
SimpleSet(java.lang.Object[] os)
Creates a set from an array of Objects . |
Method Summary | |
boolean |
equals(java.lang.Object e1,
java.lang.Object e2)
Checks if two objects are equal. |
boolean |
isElement(java.lang.Object e)
Checks if an Object 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 of this
set. |
long |
size()
Returns the size of this set. |
long |
sizeSkel()
Returns the size of the skeleton subset. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object[] elements
Constructor Detail |
public SimpleSet()
public SimpleSet(java.lang.Object[] os)
Objects
.os
- all the elements of the new set.public SimpleSet(java.lang.Object o)
o
- the Object
which will be the
element of the new set.public SimpleSet(int i)
int
as element.i
- the int
which will be the
element of the new set.public SimpleSet(int from, int to)
from
- the first element of the setto
- the last element of the setpublic SimpleSet(int[] is)
ints
.is
- all the elements of the new set.Method Detail |
public boolean isElement(java.lang.Object e)
Object
is contained in this set. It uses the method
equals(java.lang.Object, java.lang.Object)
with the parameter e
as second parameter to check
for equality.isElement
in interface Set
e
- a value of type Object
boolean
public boolean equals(java.lang.Object e1, java.lang.Object e2)
equals
in interface Set
e1
- a value of type Object
e2
- a value of type Object
boolean
public java.util.Iterator iterator()
Iterator
of the elements of this set.iterator
in interface Set
Iterator
of all elements of this set.public long size()
size
in interface Set
public long sizeSkel()
size()
.sizeSkel
in interface Set
public java.util.Iterator iteratorSkel()
Iterator
of the elements of the skeleton subset of this
set. This is the same as iterator
.iteratorSkel
in interface Set
Iterator
of all elements of the skeleton
of this set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |