Package org.eclipse.emf.common.util
Interface InterningSet<E>
- All Superinterfaces:
Collection<E>,Iterable<E>,Set<E>
- All Known Implementing Classes:
Pool,SegmentSequence.SegmentSequencePool,SegmentSequence.StringArrayPool,URI.URIPool,WeakInterningHashSet
- Since:
- 2.9
-
Method Summary
Modifier and TypeMethodDescriptionReturns either the instance already contained in the set that's equal to the given object, ornullif the object is not in the set.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.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
intern
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.- Parameters:
object- the object to intern.- Returns:
- the existing instance already contained in the set equal to the given object, or the object itself (or perhaps in some implementations, an object equal to the object itself).
-
get
Returns either the instance already contained in the set that's equal to the given object, ornullif the object is not in the set.- Parameters:
object- the object to intern.- Returns:
- the existing instance already contained in the set equal to the given object, or
nullif the object is not in the set.
-