at.jku.ssw
Class Set

java.lang.Object
  extended by at.jku.ssw.Set

public abstract class Set
extends java.lang.Object

A set of characters.


Constructor Summary
Set()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Set

public Set()
Method Detail

add

public abstract void add(char value)
Adds the value to this set.


get

public abstract boolean get(char value)
Returns true if the value is present in the set, otherwise false.


remove

public abstract boolean remove(char value)
Removes the value from this set.


size

public abstract int size()
Returns the number of values in this set.


iterator

public abstract Iterator iterator()
Returns an iterator of the values in this set.


union

public abstract Set union(Set other)
Returns a new set with the elements of this set and other.


intersect

public abstract Set intersect(Set set)
Returns a new set with the elements contained both sets this and other.


diff

public abstract Set diff(Set set)
Returns a new set with the elements contained in this set but not contained in other.


subset

public 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.