The generic class Set is a balanced binary set. The generic has a single type parameter, T - the data type of the set. The generic class Set exists in the namespace calculus (in assembly calculus.jar).
When creating a set Set<T>, the key class T is expected to be comparable. There are three ways in which the comparator for class T can be specified:
The declaration of the set class (in Java) is shown below.
public class Set<T> implements Collection<T>
Searches, insertions and removals are O(log2n).
When for is applied to a set, the entries are presented in key order.