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 AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractList
add, add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface 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.
-