java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
net.i2p.router.util.RemovableSingletonSet<E>
Type Parameters:
E - type of element in this set
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public class RemovableSingletonSet<E>extends AbstractSet<E>
Singleton set with removable element support and iterator functionality.

Similar to Collections.singleton() but provides the ability to remove the single element and clear the set. Iterator supports remove(Object) operations while maintaining singleton behavior.

Does not support add() or addAll() operations as they would violate the singleton contract. Item may not be null.

Useful for scenarios requiring a single, modifiable element with standard collection interface compliance and removal capabilities.