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 specified value to this set if it is not already present.
|
abstract boolean |
contains(char value)
Returns
true if this set contains the specified value, otherwise false . |
abstract Set |
diff(Set set)
Returns a new set with the elements contained in this set but not contained in other.
|
abstract Set |
intersect(Set set)
Returns a new set with the elements contained both sets, this and other.
|
abstract CharIterator |
iterator()
Returns an iterator over the values in this set.
|
abstract boolean |
remove(char value)
Removes the specified value from this set if it is present.
|
abstract int |
size()
Returns the number of values in this set.
|
abstract Set |
union(Set other)
Returns a new set with the elements of this set and other.
|
public abstract void add(char value)
java.lang.IllegalArgumentException
- if the specified value is a character different than the lowercase letters a to z.public abstract boolean contains(char value)
true
if this set contains the specified value, otherwise false
.public abstract boolean remove(char value)
public abstract int size()
public abstract CharIterator iterator()
public abstract Set union(Set other)
public abstract Set intersect(Set set)