public class org.apache.lucene.spatial.prefix.tree.S2PrefixTree extends org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.lucene.spatial.prefix.tree.S2PrefixTree
super_class: org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree
{
protected final org.apache.lucene.spatial.prefix.tree.S2ShapeFactory s2ShapeFactory;
descriptor: Lorg/apache/lucene/spatial/prefix/tree/S2ShapeFactory;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final int arity;
descriptor: I
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
public void <init>(org.locationtech.spatial4j.context.SpatialContext, int);
descriptor: (Lorg/locationtech/spatial4j/context/SpatialContext;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
iload 2
iconst_1
invokespecial org.apache.lucene.spatial.prefix.tree.S2PrefixTree.<init>:(Lorg/locationtech/spatial4j/context/SpatialContext;II)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
0 2 1 ctx Lorg/locationtech/spatial4j/context/SpatialContext;
0 2 2 maxLevels I
MethodParameters:
Name Flags
ctx
maxLevels
public void <init>(org.locationtech.spatial4j.context.SpatialContext, int, int);
descriptor: (Lorg/locationtech/spatial4j/context/SpatialContext;II)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
iload 2
invokespecial org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree.<init>:(Lorg/locationtech/spatial4j/context/SpatialContext;I)V
1: aload 1
invokevirtual org.locationtech.spatial4j.context.SpatialContext.getShapeFactory:()Lorg/locationtech/spatial4j/shape/ShapeFactory;
instanceof org.apache.lucene.spatial.prefix.tree.S2ShapeFactory
ifne 3
2: new java.lang.IllegalArgumentException
dup
ldc "Spatial context does not support S2 spatial index."
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.apache.lucene.spatial.prefix.tree.S2PrefixTree org.locationtech.spatial4j.context.SpatialContext int int
StackMap stack:
aload 0
aload 1
invokevirtual org.locationtech.spatial4j.context.SpatialContext.getShapeFactory:()Lorg/locationtech/spatial4j/shape/ShapeFactory;
checkcast org.apache.lucene.spatial.prefix.tree.S2ShapeFactory
putfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.s2ShapeFactory:Lorg/apache/lucene/spatial/prefix/tree/S2ShapeFactory;
4: iload 3
iconst_1
if_icmplt 5
iload 3
iconst_3
if_icmple 6
5: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Invalid value for S2 tree arity. Possible values are 1, 2 or 3. Provided value is "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 3
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
iload 3
putfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.arity:I
7: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
0 8 1 ctx Lorg/locationtech/spatial4j/context/SpatialContext;
0 8 2 maxLevels I
0 8 3 arity I
MethodParameters:
Name Flags
ctx
maxLevels
arity
public static int getMaxLevels(int);
descriptor: (I)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: bipush 30
iload 0
idiv
iconst_1
iadd
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arity I
MethodParameters:
Name Flags
arity
public int getLevelForDistance(double);
descriptor: (D)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: dload 1
dconst_0
dcmpl
ifne 2
1: aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.maxLevels:I
ireturn
2: StackMap locals:
StackMap stack:
getstatic com.google.common.geometry.S2Projections.MAX_WIDTH:Lcom/google/common/geometry/S2$Metric;
dload 1
ldc 0.017453292519943295
dmul
invokevirtual com.google.common.geometry.S2$Metric.getMinLevel:(D)I
istore 3
start local 3 3: iload 3
aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.arity:I
irem
ifeq 4
iconst_1
goto 5
StackMap locals: int
StackMap stack:
4: iconst_0
StackMap locals:
StackMap stack: int
5: istore 4
start local 4 6: iload 3
aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.arity:I
idiv
iload 4
iadd
istore 3
7: aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.maxLevels:I
iload 3
iconst_1
iadd
invokestatic java.lang.Math.min:(II)I
ireturn
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
0 8 1 dist D
3 8 3 level I
6 8 4 roundLevel I
MethodParameters:
Name Flags
dist
public double getDistanceForLevel(int);
descriptor: (I)D
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: iload 1
ifne 2
1: ldc 180.0
dreturn
2: StackMap locals:
StackMap stack:
getstatic com.google.common.geometry.S2Projections.MAX_WIDTH:Lcom/google/common/geometry/S2$Metric;
aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.arity:I
iload 1
iconst_1
isub
imul
invokevirtual com.google.common.geometry.S2$Metric.getValue:(I)D
ldc 57.29577951308232
dmul
dreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
0 3 1 level I
MethodParameters:
Name Flags
level
public org.apache.lucene.spatial.prefix.tree.Cell getWorldCell();
descriptor: ()Lorg/apache/lucene/spatial/prefix/tree/Cell;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell
dup
aload 0
aconst_null
invokespecial org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell.<init>:(Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;Lcom/google/common/geometry/S2CellId;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
public org.apache.lucene.spatial.prefix.tree.Cell readCell(org.apache.lucene.util.BytesRef, org.apache.lucene.spatial.prefix.tree.Cell);
descriptor: (Lorg/apache/lucene/util/BytesRef;Lorg/apache/lucene/spatial/prefix/tree/Cell;)Lorg/apache/lucene/spatial/prefix/tree/Cell;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 2
checkcast org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell
astore 3
start local 3 1: aload 3
ifnonnull 3
2: aload 0
invokevirtual org.apache.lucene.spatial.prefix.tree.S2PrefixTree.getWorldCell:()Lorg/apache/lucene/spatial/prefix/tree/Cell;
checkcast org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell
astore 3
3: StackMap locals: org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell
StackMap stack:
aload 3
aload 0
aload 1
invokevirtual org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell.readCell:(Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;Lorg/apache/lucene/util/BytesRef;)V
4: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
0 5 1 term Lorg/apache/lucene/util/BytesRef;
0 5 2 scratch Lorg/apache/lucene/spatial/prefix/tree/Cell;
1 5 3 cell Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTreeCell;
MethodParameters:
Name Flags
term
scratch
public org.apache.lucene.spatial.prefix.tree.CellIterator getTreeCellIterator(org.locationtech.spatial4j.shape.Shape, int);
descriptor: (Lorg/locationtech/spatial4j/shape/Shape;I)Lorg/apache/lucene/spatial/prefix/tree/CellIterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof org.locationtech.spatial4j.shape.Point
ifne 2
1: aload 0
aload 1
iload 2
invokespecial org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree.getTreeCellIterator:(Lorg/locationtech/spatial4j/shape/Shape;I)Lorg/apache/lucene/spatial/prefix/tree/CellIterator;
areturn
2: StackMap locals:
StackMap stack:
aload 1
checkcast org.locationtech.spatial4j.shape.Point
astore 3
start local 3 3: aload 3
invokeinterface org.locationtech.spatial4j.shape.Point.getY:()D
aload 3
invokeinterface org.locationtech.spatial4j.shape.Point.getX:()D
invokestatic com.google.common.geometry.S2LatLng.fromDegrees:(DD)Lcom/google/common/geometry/S2LatLng;
invokestatic com.google.common.geometry.S2CellId.fromLatLng:(Lcom/google/common/geometry/S2LatLng;)Lcom/google/common/geometry/S2CellId;
aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.arity:I
iload 2
iconst_1
isub
imul
invokevirtual com.google.common.geometry.S2CellId.parent:(I)Lcom/google/common/geometry/S2CellId;
astore 4
start local 4 4: new java.util.ArrayList
dup
iload 2
invokespecial java.util.ArrayList.<init>:(I)V
astore 5
start local 5 5: iconst_0
istore 6
start local 6 6: goto 9
7: StackMap locals: org.apache.lucene.spatial.prefix.tree.S2PrefixTree org.locationtech.spatial4j.shape.Shape int org.locationtech.spatial4j.shape.Point com.google.common.geometry.S2CellId java.util.List int
StackMap stack:
aload 5
new org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell
dup
aload 0
aload 4
iload 6
aload 0
getfield org.apache.lucene.spatial.prefix.tree.S2PrefixTree.arity:I
imul
invokevirtual com.google.common.geometry.S2CellId.parent:(I)Lcom/google/common/geometry/S2CellId;
invokespecial org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell.<init>:(Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;Lcom/google/common/geometry/S2CellId;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
8: iinc 6 1
StackMap locals:
StackMap stack:
9: iload 6
iload 2
iconst_1
isub
if_icmplt 7
end local 6 10: aload 5
new org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell
dup
aload 0
aload 4
invokespecial org.apache.lucene.spatial.prefix.tree.S2PrefixTreeCell.<init>:(Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;Lcom/google/common/geometry/S2CellId;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
11: new org.apache.lucene.spatial.prefix.tree.FilterCellIterator
dup
aload 5
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
aconst_null
invokespecial org.apache.lucene.spatial.prefix.tree.FilterCellIterator.<init>:(Ljava/util/Iterator;Lorg/locationtech/spatial4j/shape/Shape;)V
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/apache/lucene/spatial/prefix/tree/S2PrefixTree;
0 12 1 shape Lorg/locationtech/spatial4j/shape/Shape;
0 12 2 detailLevel I
3 12 3 p Lorg/locationtech/spatial4j/shape/Point;
4 12 4 id Lcom/google/common/geometry/S2CellId;
5 12 5 cells Ljava/util/List<Lorg/apache/lucene/spatial/prefix/tree/Cell;>;
6 10 6 i I
MethodParameters:
Name Flags
shape
detailLevel
}
SourceFile: "S2PrefixTree.java"
NestMembers:
org.apache.lucene.spatial.prefix.tree.S2PrefixTree$Factory
InnerClasses:
public Metric = com.google.common.geometry.S2$Metric of com.google.common.geometry.S2
protected Factory = org.apache.lucene.spatial.prefix.tree.S2PrefixTree$Factory of org.apache.lucene.spatial.prefix.tree.S2PrefixTree