-
- All Implemented Interfaces:
-
kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.Set
public final class LookupSet<T extends Object> implements Set<T>
Simple lookup set. This is intended to allow the use of the
in {collection}syntax with sets of values that either (1) are too simple to justify using aSet(e.g. only 2 values), or (2) require algorithmic checking (e.g. anIntis even – easy to check in anifbut not easy in awhenselector).The constructor takes a lambda parameter, a function that tests whether the value is a member of the notional "set". It is expected that only the
containsfunction will be used, mostly from theinor!inconstruct.
-
-
Method Summary
Modifier and Type Method Description IntegergetSize()final Function1<T, Boolean>getCheck()BooleanisEmpty()Iterator<T>iterator()Booleancontains(T element)BooleancontainsAll(Collection<T> elements)-
Methods inherited from class kotlin.collections.Iterable
forEach -
Methods inherited from class kotlin.collections.Collection
parallelStream, stream, toArray -
Methods inherited from class kotlin.collections.Set
spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-