final class com.google.common.collect.TopKSelector<T>
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.google.common.collect.TopKSelector
super_class: java.lang.Object
{
private final int k;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Comparator<? super T> comparator;
descriptor: Ljava/util/Comparator;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Comparator<-TT;>;
private final T[] buffer;
descriptor: [Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: [TT;
private int bufferSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private T threshold;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Signature: TT;
RuntimeVisibleTypeAnnotations:
FIELD
org.checkerframework.checker.nullness.qual.Nullable()
public static <T extends java.lang.Comparable<? super T>> com.google.common.collect.TopKSelector<T> least(int);
descriptor: (I)Lcom/google/common/collect/TopKSelector;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
invokestatic com.google.common.collect.Ordering.natural:()Lcom/google/common/collect/Ordering;
invokestatic com.google.common.collect.TopKSelector.least:(ILjava/util/Comparator;)Lcom/google/common/collect/TopKSelector;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 k I
Signature: <T::Ljava/lang/Comparable<-TT;>;>(I)Lcom/google/common/collect/TopKSelector<TT;>;
MethodParameters:
Name Flags
k
public static <T> com.google.common.collect.TopKSelector<T> least(int, java.util.Comparator<? super T>);
descriptor: (ILjava/util/Comparator;)Lcom/google/common/collect/TopKSelector;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: new com.google.common.collect.TopKSelector
dup
aload 1
iload 0
invokespecial com.google.common.collect.TopKSelector.<init>:(Ljava/util/Comparator;I)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 k I
0 1 1 comparator Ljava/util/Comparator<-TT;>;
Signature: <T:Ljava/lang/Object;>(ILjava/util/Comparator<-TT;>;)Lcom/google/common/collect/TopKSelector<TT;>;
MethodParameters:
Name Flags
k
comparator
public static <T extends java.lang.Comparable<? super T>> com.google.common.collect.TopKSelector<T> greatest(int);
descriptor: (I)Lcom/google/common/collect/TopKSelector;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
invokestatic com.google.common.collect.Ordering.natural:()Lcom/google/common/collect/Ordering;
invokestatic com.google.common.collect.TopKSelector.greatest:(ILjava/util/Comparator;)Lcom/google/common/collect/TopKSelector;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 k I
Signature: <T::Ljava/lang/Comparable<-TT;>;>(I)Lcom/google/common/collect/TopKSelector<TT;>;
MethodParameters:
Name Flags
k
public static <T> com.google.common.collect.TopKSelector<T> greatest(int, java.util.Comparator<? super T>);
descriptor: (ILjava/util/Comparator;)Lcom/google/common/collect/TopKSelector;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: new com.google.common.collect.TopKSelector
dup
aload 1
invokestatic com.google.common.collect.Ordering.from:(Ljava/util/Comparator;)Lcom/google/common/collect/Ordering;
invokevirtual com.google.common.collect.Ordering.reverse:()Lcom/google/common/collect/Ordering;
iload 0
invokespecial com.google.common.collect.TopKSelector.<init>:(Ljava/util/Comparator;I)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 k I
0 1 1 comparator Ljava/util/Comparator<-TT;>;
Signature: <T:Ljava/lang/Object;>(ILjava/util/Comparator<-TT;>;)Lcom/google/common/collect/TopKSelector<TT;>;
MethodParameters:
Name Flags
k
comparator
private void <init>(java.util.Comparator<? super T>, );
descriptor: (Ljava/util/Comparator;I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
ldc "comparator"
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.Comparator
putfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
2: aload 0
iload 2
putfield com.google.common.collect.TopKSelector.k:I
3: iload 2
iflt 4
iconst_1
goto 5
StackMap locals: com.google.common.collect.TopKSelector java.util.Comparator int
StackMap stack:
4: iconst_0
StackMap locals:
StackMap stack: int
5: ldc "k must be nonnegative, was %s"
iload 2
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;I)V
6: aload 0
iload 2
iconst_2
imul
anewarray java.lang.Object
putfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
7: aload 0
iconst_0
putfield com.google.common.collect.TopKSelector.bufferSize:I
8: aload 0
aconst_null
putfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 10 1 comparator Ljava/util/Comparator<-TT;>;
0 10 2 k I
Signature: (Ljava/util/Comparator<-TT;>;I)V
MethodParameters:
Name Flags
comparator
k
public void offer();
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.google.common.collect.TopKSelector.k:I
ifne 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.collect.TopKSelector.bufferSize:I
ifne 7
3: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iconst_0
aload 1
aastore
4: aload 0
aload 1
putfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
5: aload 0
iconst_1
putfield com.google.common.collect.TopKSelector.bufferSize:I
6: goto 16
StackMap locals:
StackMap stack:
7: aload 0
getfield com.google.common.collect.TopKSelector.bufferSize:I
aload 0
getfield com.google.common.collect.TopKSelector.k:I
if_icmpge 12
8: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
aload 0
dup
getfield com.google.common.collect.TopKSelector.bufferSize:I
dup_x1
iconst_1
iadd
putfield com.google.common.collect.TopKSelector.bufferSize:I
aload 1
aastore
9: aload 0
getfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
aload 1
aload 0
getfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
invokeinterface java.util.Comparator.compare:(Ljava/lang/Object;Ljava/lang/Object;)I
ifle 16
10: aload 0
aload 1
putfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
11: goto 16
StackMap locals:
StackMap stack:
12: aload 0
getfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
aload 1
aload 0
getfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
invokeinterface java.util.Comparator.compare:(Ljava/lang/Object;Ljava/lang/Object;)I
ifge 16
13: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
aload 0
dup
getfield com.google.common.collect.TopKSelector.bufferSize:I
dup_x1
iconst_1
iadd
putfield com.google.common.collect.TopKSelector.bufferSize:I
aload 1
aastore
14: aload 0
getfield com.google.common.collect.TopKSelector.bufferSize:I
iconst_2
aload 0
getfield com.google.common.collect.TopKSelector.k:I
imul
if_icmpne 16
15: aload 0
invokevirtual com.google.common.collect.TopKSelector.trim:()V
16: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 17 1 elem TT;
Signature: (TT;)V
RuntimeVisibleTypeAnnotations:
METHOD_FORMAL_PARAMETER
org.checkerframework.checker.nullness.qual.Nullable()
MethodParameters:
Name Flags
elem
private void trim();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=8, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: iconst_2
aload 0
getfield com.google.common.collect.TopKSelector.k:I
imul
iconst_1
isub
istore 2
start local 2 2: iconst_0
istore 3
start local 3 3: iconst_0
istore 4
start local 4 4: iload 2
iload 1
isub
getstatic java.math.RoundingMode.CEILING:Ljava/math/RoundingMode;
invokestatic com.google.common.math.IntMath.log2:(ILjava/math/RoundingMode;)I
iconst_3
imul
istore 5
start local 5 5: goto 18
6: StackMap locals: com.google.common.collect.TopKSelector int int int int int
StackMap stack:
iload 1
iload 2
iadd
iconst_1
iadd
iconst_1
iushr
istore 6
start local 6 7: aload 0
iload 1
iload 2
iload 6
invokevirtual com.google.common.collect.TopKSelector.partition:(III)I
istore 7
start local 7 8: iload 7
aload 0
getfield com.google.common.collect.TopKSelector.k:I
if_icmple 11
9: iload 7
iconst_1
isub
istore 2
10: goto 14
StackMap locals: int int
StackMap stack:
11: iload 7
aload 0
getfield com.google.common.collect.TopKSelector.k:I
if_icmpge 19
12: iload 7
iload 1
iconst_1
iadd
invokestatic java.lang.Math.max:(II)I
istore 1
13: iload 7
istore 3
14: StackMap locals:
StackMap stack:
iinc 4 1
15: iload 4
iload 5
if_icmplt 18
16: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 1
iload 2
aload 0
getfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
invokestatic java.util.Arrays.sort:([Ljava/lang/Object;IILjava/util/Comparator;)V
17: goto 19
end local 7 end local 6 18: StackMap locals:
StackMap stack:
iload 1
iload 2
if_icmplt 6
19: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield com.google.common.collect.TopKSelector.k:I
putfield com.google.common.collect.TopKSelector.bufferSize:I
20: aload 0
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 3
aaload
putfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
21: iload 3
iconst_1
iadd
istore 6
start local 6 22: goto 26
23: StackMap locals: int
StackMap stack:
aload 0
getfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 6
aaload
aload 0
getfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
invokeinterface java.util.Comparator.compare:(Ljava/lang/Object;Ljava/lang/Object;)I
ifle 25
24: aload 0
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 6
aaload
putfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
25: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
26: iload 6
aload 0
getfield com.google.common.collect.TopKSelector.k:I
if_icmplt 23
end local 6 27: return
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 28 0 this Lcom/google/common/collect/TopKSelector<TT;>;
1 28 1 left I
2 28 2 right I
3 28 3 minThresholdPosition I
4 28 4 iterations I
5 28 5 maxIterations I
7 18 6 pivotIndex I
8 18 7 pivotNewIndex I
22 27 6 i I
private int partition(int, int, int);
descriptor: (III)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 3
aaload
astore 4
start local 4 1: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 3
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 2
aaload
aastore
2: iload 1
istore 5
start local 5 3: iload 1
istore 6
start local 6 4: goto 9
5: StackMap locals: java.lang.Object int int
StackMap stack:
aload 0
getfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 6
aaload
aload 4
invokeinterface java.util.Comparator.compare:(Ljava/lang/Object;Ljava/lang/Object;)I
ifge 8
6: aload 0
iload 5
iload 6
invokevirtual com.google.common.collect.TopKSelector.swap:(II)V
7: iinc 5 1
8: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
9: iload 6
iload 2
if_icmplt 5
end local 6 10: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 2
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 5
aaload
aastore
11: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 5
aload 4
aastore
12: iload 5
ireturn
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 13 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 13 1 left I
0 13 2 right I
0 13 3 pivotIndex I
1 13 4 pivotValue TT;
3 13 5 pivotNewIndex I
4 10 6 i I
MethodParameters:
Name Flags
left
right
pivotIndex
private void swap(int, int);
descriptor: (II)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 1
aaload
astore 3
start local 3 1: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 1
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 2
aaload
aastore
2: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 2
aload 3
aastore
3: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 4 1 i I
0 4 2 j I
1 4 3 tmp TT;
MethodParameters:
Name Flags
i
j
com.google.common.collect.TopKSelector<T> combine(com.google.common.collect.TopKSelector<T>);
descriptor: (Lcom/google/common/collect/TopKSelector;)Lcom/google/common/collect/TopKSelector;
flags: (0x0000)
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: goto 4
2: StackMap locals: int
StackMap stack:
aload 0
aload 1
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iload 2
aaload
invokevirtual com.google.common.collect.TopKSelector.offer:(Ljava/lang/Object;)V
3: iinc 2 1
StackMap locals:
StackMap stack:
4: iload 2
aload 1
getfield com.google.common.collect.TopKSelector.bufferSize:I
if_icmplt 2
end local 2 5: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 6 1 other Lcom/google/common/collect/TopKSelector<TT;>;
1 5 2 i I
Signature: (Lcom/google/common/collect/TopKSelector<TT;>;)Lcom/google/common/collect/TopKSelector<TT;>;
MethodParameters:
Name Flags
other
public void offerAll(java.lang.Iterable<? extends T>);
descriptor: (Ljava/lang/Iterable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokeinterface java.lang.Iterable.iterator:()Ljava/util/Iterator;
invokevirtual com.google.common.collect.TopKSelector.offerAll:(Ljava/util/Iterator;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 2 1 elements Ljava/lang/Iterable<+TT;>;
Signature: (Ljava/lang/Iterable<+TT;>;)V
MethodParameters:
Name Flags
elements
public void offerAll(java.util.Iterator<? extends T>);
descriptor: (Ljava/util/Iterator;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: goto 2
1: StackMap locals:
StackMap stack:
aload 0
aload 1
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
invokevirtual com.google.common.collect.TopKSelector.offer:(Ljava/lang/Object;)V
2: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/google/common/collect/TopKSelector<TT;>;
0 4 1 elements Ljava/util/Iterator<+TT;>;
Signature: (Ljava/util/Iterator<+TT;>;)V
MethodParameters:
Name Flags
elements
public java.util.List<T> topK();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
iconst_0
aload 0
getfield com.google.common.collect.TopKSelector.bufferSize:I
aload 0
getfield com.google.common.collect.TopKSelector.comparator:Ljava/util/Comparator;
invokestatic java.util.Arrays.sort:([Ljava/lang/Object;IILjava/util/Comparator;)V
1: aload 0
getfield com.google.common.collect.TopKSelector.bufferSize:I
aload 0
getfield com.google.common.collect.TopKSelector.k:I
if_icmple 5
2: aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
aload 0
getfield com.google.common.collect.TopKSelector.k:I
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
arraylength
aconst_null
invokestatic java.util.Arrays.fill:([Ljava/lang/Object;IILjava/lang/Object;)V
3: aload 0
aload 0
getfield com.google.common.collect.TopKSelector.k:I
putfield com.google.common.collect.TopKSelector.bufferSize:I
4: aload 0
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
aload 0
getfield com.google.common.collect.TopKSelector.k:I
iconst_1
isub
aaload
putfield com.google.common.collect.TopKSelector.threshold:Ljava/lang/Object;
5: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.collect.TopKSelector.buffer:[Ljava/lang/Object;
aload 0
getfield com.google.common.collect.TopKSelector.bufferSize:I
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokestatic java.util.Collections.unmodifiableList:(Ljava/util/List;)Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/google/common/collect/TopKSelector<TT;>;
Signature: ()Ljava/util/List<TT;>;
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "TopKSelector.java"
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtCompatible()