Package com.google.common.geometry
Class S2CellIndex.Labels
- All Implemented Interfaces:
Iterable<Integer>
,Collection<Integer>
,List<Integer>
,SequencedCollection<Integer>
- Enclosing class:
S2CellIndex
A set of labels that can be grown by
S2CellIndex.getIntersectingLabels(S2CellUnion, Labels)
and
shrunk via clear()
or normalize()
. May contain duplicates or be unsorted unless
normalize()
is called.-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
labels
private int[] labels -
size
private int size
-
-
Constructor Details
-
Labels
public Labels()
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Integer>
- Specified by:
clear
in interfaceList<Integer>
- Overrides:
clear
in classAbstractList<Integer>
-
add
private boolean add(int label) -
size
public int size()- Specified by:
size
in interfaceCollection<Integer>
- Specified by:
size
in interfaceList<Integer>
- Specified by:
size
in classAbstractCollection<Integer>
-
get
-
getInt
public int getInt(int index) Asget(int)
but without the overhead of boxing. -
normalize
public void normalize()Sorts the labels and removes duplicates.
-