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, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, 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, toArrayMethods 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:
clearin interfaceCollection<Integer>- Specified by:
clearin interfaceList<Integer>- Overrides:
clearin classAbstractList<Integer>
-
add
private boolean add(int label) -
size
public int size()- Specified by:
sizein interfaceCollection<Integer>- Specified by:
sizein interfaceList<Integer>- Specified by:
sizein 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.
-