public abstract class Set
extends java.lang.Object
Constructor and Description |
---|
Set() |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(char value)
Adds the value to this set.
|
abstract Set |
diff(Set set)
Returns a new set with the elements contained in this set but not contained in other.
|
abstract boolean |
get(char value)
Returns
true if the value is present in the set, otherwise false . |
abstract Set |
intersect(Set set)
Returns a new set with the elements contained both sets this and other.
|
abstract Iterator |
iterator()
Returns an iterator of the values in this set.
|
abstract boolean |
remove(char value)
Removes the value from this set.
|
abstract int |
size()
Returns the number of values in this set.
|
abstract Set |
subset(char from,
char to)
Returns a new set with the elements contained in this set in the range between from and to.
|
abstract Set |
union(Set other)
Returns a new set with the elements of this set and other.
|
public abstract void add(char value)
public abstract boolean get(char value)
true
if the value is present in the set, otherwise false
.public abstract boolean remove(char value)
public abstract int size()
public abstract Iterator iterator()
public abstract Set union(Set other)
public abstract Set intersect(Set set)
public abstract Set diff(Set set)
public abstract Set subset(char from, char to)