public class IntegerIntervalSet extends AbstractSet<Integer>
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int n) |
boolean |
contains(Object o) |
Iterator<Integer> |
iterator() |
static Set<Integer> |
of(String s)
Parses a range of integers expressed as a string.
|
int |
size() |
equals, hashCode, removeAlladd, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringpublic static Set<Integer> of(String s)
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.s - Range setpublic int size()
size in interface Collection<Integer>size in interface Set<Integer>size in class AbstractCollection<Integer>public boolean contains(Object o)
contains in interface Collection<Integer>contains in interface Set<Integer>contains in class AbstractCollection<Integer>public boolean contains(int n)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.