public class java.util.HashSet<E> extends java.util.AbstractSet<E> implements java.util.Set<E>, java.lang.Cloneable, java.io.Serializable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: java.util.HashSet
super_class: java.util.AbstractSet
{
static final long serialVersionUID;
descriptor: J
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: -5024744406713321676
private transient java.util.HashMap<E, java.lang.Object> map;
descriptor: Ljava/util/HashMap;
flags: (0x0082) ACC_PRIVATE, ACC_TRANSIENT
Signature: Ljava/util/HashMap<TE;Ljava/lang/Object;>;
private static final java.lang.Object PRESENT;
descriptor: Ljava/lang/Object;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putstatic java.util.HashSet.PRESENT:Ljava/lang/Object;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.util.AbstractSet.<init>:()V
1: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield java.util.HashSet.map:Ljava/util/HashMap;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/HashSet<TE;>;
public void <init>(java.util.Collection<? extends E>);
descriptor: (Ljava/util/Collection;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.util.AbstractSet.<init>:()V
1: aload 0
new java.util.HashMap
dup
aload 1
invokeinterface java.util.Collection.size:()I
i2f
ldc 0.75
fdiv
f2i
iconst_1
iadd
bipush 16
invokestatic java.lang.Math.max:(II)I
invokespecial java.util.HashMap.<init>:(I)V
putfield java.util.HashSet.map:Ljava/util/HashMap;
2: aload 0
aload 1
invokevirtual java.util.HashSet.addAll:(Ljava/util/Collection;)Z
pop
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/util/HashSet<TE;>;
0 4 1 c Ljava/util/Collection<+TE;>;
Signature: (Ljava/util/Collection<+TE;>;)V
MethodParameters:
Name Flags
c
public void <init>(int, float);
descriptor: (IF)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.util.AbstractSet.<init>:()V
1: aload 0
new java.util.HashMap
dup
iload 1
fload 2
invokespecial java.util.HashMap.<init>:(IF)V
putfield java.util.HashSet.map:Ljava/util/HashMap;
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/HashSet<TE;>;
0 3 1 initialCapacity I
0 3 2 loadFactor F
MethodParameters:
Name Flags
initialCapacity
loadFactor
public void <init>(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.util.AbstractSet.<init>:()V
1: aload 0
new java.util.HashMap
dup
iload 1
invokespecial java.util.HashMap.<init>:(I)V
putfield java.util.HashSet.map:Ljava/util/HashMap;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/HashSet<TE;>;
0 3 1 initialCapacity I
MethodParameters:
Name Flags
initialCapacity
void <init>(int, float, boolean);
descriptor: (IFZ)V
flags: (0x0000)
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.util.AbstractSet.<init>:()V
1: aload 0
new java.util.LinkedHashMap
dup
iload 1
fload 2
invokespecial java.util.LinkedHashMap.<init>:(IF)V
putfield java.util.HashSet.map:Ljava/util/HashMap;
2: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/HashSet<TE;>;
0 3 1 initialCapacity I
0 3 2 loadFactor F
0 3 3 dummy Z
MethodParameters:
Name Flags
initialCapacity
loadFactor
dummy
public java.util.Iterator<E> iterator();
descriptor: ()Ljava/util/Iterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.keySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
Signature: ()Ljava/util/Iterator<TE;>;
public int size();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.size:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
public boolean isEmpty();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.isEmpty:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
public boolean contains(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 1
invokevirtual java.util.HashMap.containsKey:(Ljava/lang/Object;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
0 1 1 o Ljava/lang/Object;
MethodParameters:
Name Flags
o
public boolean add();
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 1
getstatic java.util.HashSet.PRESENT:Ljava/lang/Object;
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
ifnonnull 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/util/HashSet<TE;>;
0 2 1 e TE;
Signature: (TE;)Z
MethodParameters:
Name Flags
e
public boolean remove(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 1
invokevirtual java.util.HashMap.remove:(Ljava/lang/Object;)Ljava/lang/Object;
getstatic java.util.HashSet.PRESENT:Ljava/lang/Object;
if_acmpne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/util/HashSet<TE;>;
0 2 1 o Ljava/lang/Object;
MethodParameters:
Name Flags
o
public void clear();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.clear:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/util/HashSet<TE;>;
public java.lang.Object clone();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.clone:()Ljava/lang/Object;
checkcast java.util.HashSet
astore 1
start local 1 1: aload 1
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.clone:()Ljava/lang/Object;
checkcast java.util.HashMap
putfield java.util.HashSet.map:Ljava/util/HashMap;
2: aload 1
3: areturn
end local 1 4: StackMap locals:
StackMap stack: java.lang.CloneNotSupportedException
astore 1
start local 1 5: new java.lang.InternalError
dup
aload 1
invokespecial java.lang.InternalError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljava/util/HashSet<TE;>;
1 4 1 newSet Ljava/util/HashSet<TE;>;
5 6 1 e Ljava/lang/CloneNotSupportedException;
Exception table:
from to target type
0 3 4 Class java.lang.CloneNotSupportedException
private void writeObject(java.io.ObjectOutputStream);
descriptor: (Ljava/io/ObjectOutputStream;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.io.ObjectOutputStream.defaultWriteObject:()V
1: aload 1
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.capacity:()I
invokevirtual java.io.ObjectOutputStream.writeInt:(I)V
2: aload 1
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.loadFactor:()F
invokevirtual java.io.ObjectOutputStream.writeFloat:(F)V
3: aload 1
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.size:()I
invokevirtual java.io.ObjectOutputStream.writeInt:(I)V
4: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.keySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 7
StackMap locals: java.util.HashSet java.io.ObjectOutputStream top java.util.Iterator
StackMap stack:
5: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Object
astore 2
start local 2 6: aload 1
aload 2
invokevirtual java.io.ObjectOutputStream.writeObject:(Ljava/lang/Object;)V
end local 2 7: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
8: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljava/util/HashSet<TE;>;
0 9 1 s Ljava/io/ObjectOutputStream;
6 7 2 e TE;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
s
private void readObject(java.io.ObjectInputStream);
descriptor: (Ljava/io/ObjectInputStream;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.io.ObjectInputStream.defaultReadObject:()V
1: aload 1
invokevirtual java.io.ObjectInputStream.readInt:()I
istore 2
start local 2 2: iload 2
ifge 6
3: new java.io.InvalidObjectException
dup
new java.lang.StringBuilder
dup
ldc "Illegal capacity: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
4: iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
5: invokespecial java.io.InvalidObjectException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: int
StackMap stack:
aload 1
invokevirtual java.io.ObjectInputStream.readFloat:()F
fstore 3
start local 3 7: fload 3
fconst_0
fcmpg
ifle 8
fload 3
invokestatic java.lang.Float.isNaN:(F)Z
ifeq 11
8: StackMap locals: float
StackMap stack:
new java.io.InvalidObjectException
dup
new java.lang.StringBuilder
dup
ldc "Illegal load factor: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
9: fload 3
invokevirtual java.lang.StringBuilder.append:(F)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
10: invokespecial java.io.InvalidObjectException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.io.ObjectInputStream.readInt:()I
istore 4
start local 4 12: iload 4
ifge 16
13: new java.io.InvalidObjectException
dup
new java.lang.StringBuilder
dup
ldc "Illegal size: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
14: iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
15: invokespecial java.io.InvalidObjectException.<init>:(Ljava/lang/String;)V
athrow
16: StackMap locals: int
StackMap stack:
iload 4
i2f
fconst_1
fload 3
fdiv
ldc 4.0
invokestatic java.lang.Math.min:(FF)F
fmul
17: ldc 1.07374182E9
18: invokestatic java.lang.Math.min:(FF)F
f2i
istore 2
19: invokestatic jdk.internal.access.SharedSecrets.getJavaObjectInputStreamAccess:()Ljdk/internal/access/JavaObjectInputStreamAccess;
20: aload 1
ldc [Ljava/util/Map$Entry;
iload 2
invokestatic java.util.HashMap.tableSizeFor:(I)I
invokeinterface jdk.internal.access.JavaObjectInputStreamAccess.checkArray:(Ljava/io/ObjectInputStream;Ljava/lang/Class;I)V
21: aload 0
aload 0
instanceof java.util.LinkedHashSet
ifeq 23
22: new java.util.LinkedHashMap
dup
iload 2
fload 3
invokespecial java.util.LinkedHashMap.<init>:(IF)V
goto 24
23: StackMap locals:
StackMap stack: java.util.HashSet
new java.util.HashMap
dup
iload 2
fload 3
invokespecial java.util.HashMap.<init>:(IF)V
24: StackMap locals: java.util.HashSet java.io.ObjectInputStream int float int
StackMap stack: java.util.HashSet java.util.HashMap
putfield java.util.HashSet.map:Ljava/util/HashMap;
25: iconst_0
istore 5
start local 5 26: goto 30
27: StackMap locals: int
StackMap stack:
aload 1
invokevirtual java.io.ObjectInputStream.readObject:()Ljava/lang/Object;
astore 6
start local 6 28: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 6
getstatic java.util.HashSet.PRESENT:Ljava/lang/Object;
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 6 29: iinc 5 1
StackMap locals:
StackMap stack:
30: iload 5
iload 4
if_icmplt 27
end local 5 31: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Ljava/util/HashSet<TE;>;
0 32 1 s Ljava/io/ObjectInputStream;
2 32 2 capacity I
7 32 3 loadFactor F
12 32 4 size I
26 31 5 i I
28 29 6 e TE;
Exceptions:
throws java.io.IOException, java.lang.ClassNotFoundException
MethodParameters:
Name Flags
s
public java.util.Spliterator<E> spliterator();
descriptor: ()Ljava/util/Spliterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: new java.util.HashMap$KeySpliterator
dup
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
iconst_0
iconst_m1
iconst_0
iconst_0
invokespecial java.util.HashMap$KeySpliterator.<init>:(Ljava/util/HashMap;IIII)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
Signature: ()Ljava/util/Spliterator<TE;>;
public java.lang.Object[] toArray();
descriptor: ()[Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
invokevirtual java.util.HashMap.size:()I
anewarray java.lang.Object
invokevirtual java.util.HashMap.keysToArray:([Ljava/lang/Object;)[Ljava/lang/Object;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
public <T> T[] toArray();
descriptor: ([Ljava/lang/Object;)[Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 0
getfield java.util.HashSet.map:Ljava/util/HashMap;
aload 1
invokevirtual java.util.HashMap.prepareArray:([Ljava/lang/Object;)[Ljava/lang/Object;
invokevirtual java.util.HashMap.keysToArray:([Ljava/lang/Object;)[Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/HashSet<TE;>;
0 1 1 a [Ljava/lang/Object;
Signature: <T:Ljava/lang/Object;>([TT;)[TT;
MethodParameters:
Name Flags
a
}
Signature: <E:Ljava/lang/Object;>Ljava/util/AbstractSet<TE;>;Ljava/util/Set<TE;>;Ljava/lang/Cloneable;Ljava/io/Serializable;
SourceFile: "HashSet.java"
InnerClasses:
final KeySpliterator = java.util.HashMap$KeySpliterator of java.util.HashMap
public abstract Entry = java.util.Map$Entry of java.util.Map