public interface InterningSet<E>
extends java.util.Set<E>
| Modifier and Type | Method and Description |
|---|---|
E |
get(E object)
Returns either the instance already contained in the set that's equal to the given object, or
null if the object is not in the set. |
E |
intern(E object)
Returns either the instance already contained in the set that's equal to the given object, or adds the object to the set and returns it.
|
E intern(E object)
object - the object to intern.E get(E object)
null if the object is not in the set.object - the object to intern.null if the object is not in the set.