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 boolean
add(int label)
void
clear()
java.lang.Integer
get(int index)
int
getInt(int index)
Asget(int)
but without the overhead of boxing.void
normalize()
Sorts the labels and removes duplicates.int
size()
-
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:
clear
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
clear
in interfacejava.util.List<java.lang.Integer>
- Overrides:
clear
in classjava.util.AbstractList<java.lang.Integer>
-
add
private boolean add(int label)
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
size
in interfacejava.util.List<java.lang.Integer>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Integer>
-
get
public java.lang.Integer get(int index)
- Specified by:
get
in interfacejava.util.List<java.lang.Integer>
- Specified by:
get
in 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.
-
-