Package com.google.common.geometry
Class S2CellIndex.Labels
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.lang.Integer>
-
- com.google.common.geometry.S2CellIndex.Labels
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Integer>,java.util.Collection<java.lang.Integer>,java.util.List<java.lang.Integer>
- Enclosing class:
- S2CellIndex
public static class S2CellIndex.Labels extends java.util.AbstractList<java.lang.Integer>A set of labels that can be grown byS2CellIndex.getIntersectingLabels(S2CellUnion, Labels)and shrunk viaclear()ornormalize(). May contain duplicates or be unsorted unlessnormalize()is called.
-
-
Constructor Summary
Constructors Constructor Description Labels()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanadd(int label)voidclear()java.lang.Integerget(int index)intgetInt(int index)Asget(int)but without the overhead of boxing.voidnormalize()Sorts the labels and removes duplicates.intsize()-
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
-
-
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<java.lang.Integer>- Specified by:
clearin interfacejava.util.List<java.lang.Integer>- Overrides:
clearin classjava.util.AbstractList<java.lang.Integer>
-
add
private boolean add(int label)
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<java.lang.Integer>- Specified by:
sizein interfacejava.util.List<java.lang.Integer>- Specified by:
sizein classjava.util.AbstractCollection<java.lang.Integer>
-
get
public java.lang.Integer get(int index)
- Specified by:
getin interfacejava.util.List<java.lang.Integer>- Specified by:
getin classjava.util.AbstractList<java.lang.Integer>
-
getInt
public int getInt(int index)
Asget(int)but without the overhead of boxing.
-
normalize
public void normalize()
Sorts the labels and removes duplicates.
-
-