Package org.apache.calcite.util
Class IntegerIntervalSet
A set of non-negative integers defined by a sequence of points, intervals,
and exclusions.
-
Method Summary
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
of
Parses a range of integers expressed as a string. The string can contain non-negative integers separated by commas, ranges (represented by a hyphen between two integers), and exclusions (represented by a preceding hyphen). For example, "1,2,3-20,-7,-10-15,12".Inclusions and exclusions are performed in the order that they are seen. For example, "1-10,-2-9,3-7,-4-6" does contain 3, because it is included by "1-10", excluded by "-2-9" and last included by "3-7". But it does not include 4.
- Parameters:
s- Range set
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<Integer>- Specified by:
sizein interfaceSet<Integer>- Specified by:
sizein classAbstractCollection<Integer>
-
contains
- Specified by:
containsin interfaceCollection<Integer>- Specified by:
containsin interfaceSet<Integer>- Overrides:
containsin classAbstractCollection<Integer>
-
contains
public boolean contains(int n)
-