package

org.apache.commons.collections.set

This package contains implementations of the java.util.Set Set and java.util.SortedSet SortedSet interfaces.

The implementations are in the form of direct implementations and decorators. A decorator wraps another implementation of the interface to add some specific additional functionality.

The following implementations are provided in the package:

  • CompositeSet - a set that combines multiple sets into one
The following decorators are provided in the package:
  • Synchronized - synchronizes method access for multi-threaded environments
  • Unmodifiable - ensures the collection cannot be altered
  • Predicated - ensures that only elements that are valid according to a predicate can be added
  • Typed - ensures that only elements that are of a specific type can be added
  • Transformed - transforms each element added
  • ListOrdered - ensures that insertion order is retained
  • MapBackedSet - a set formed by decorating a Map

Interfaces

CompositeSet.SetMutator Define callbacks for mutation operations. 

Classes

AbstractSerializableSetDecorator Serializable subclass of AbstractSetDecorator. 
AbstractSetDecorator Decorates another Set to provide additional behaviour. 
AbstractSortedSetDecorator Decorates another SortedSet to provide additional behaviour. 
CompositeSet Decorates a set of other sets to provide a single unified view. 
ListOrderedSet Decorates another Set to ensure that the order of addition is retained and used by the iterator. 
MapBackedSet Decorates a Map to obtain Set behaviour. 
PredicatedSet Decorates another Set to validate that all additions match a specified predicate. 
PredicatedSortedSet Decorates another SortedSet to validate that all additions match a specified predicate. 
SynchronizedSet Decorates another Set to synchronize its behaviour for a multi-threaded environment. 
SynchronizedSortedSet Decorates another SortedSet to synchronize its behaviour for a multi-threaded environment. 
TransformedSet Decorates another Set to transform objects that are added. 
TransformedSortedSet Decorates another SortedSet to transform objects that are added. 
TypedSet Decorates another Set to validate that elements added are of a specific type. 
TypedSortedSet Decorates another SortedSet to validate that elements added are of a specific type. 
UnmodifiableSet Decorates another Set to ensure it can't be altered. 
UnmodifiableSortedSet Decorates another SortedSet to ensure it can't be altered.