mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-04 08:31:30 +00:00
Backend: If kotlin class extends kotlin.collection.List
write it as it's super interface (light class mode only)
IDE: Provide wrapper classes to java resolve
that try to emulate backend behaviour
For example if kotlin class implements kotlin.collections.Map,
we provide a superinterface that has abstract 'getEntries' method
and 'entrySet' method that is considered default.
In reality all those methods are generated in the class itself.
In IDE supporting this case without hacks is not feasible performance-wise
since kotlin.collection.* may not be an immediate supertype and we need
to compute all supertypes just to calculate own methods of the class
44 lines
1.6 KiB
Java
Vendored
44 lines
1.6 KiB
Java
Vendored
public final class SmartSet <T> extends kotlin.collections.AbstractSet<T> implements java.util.Set<T>, kotlin.collections.MutableSet<T>, kotlin.jvm.internal.markers.KMutableSet {
|
|
private java.lang.Object data;
|
|
private int size;
|
|
private static final int ARRAY_THRESHOLD = 5;
|
|
public static final SmartSet.Companion Companion;
|
|
|
|
public int getSize() { /* compiled code */ }
|
|
|
|
public void setSize(int i) { /* compiled code */ }
|
|
|
|
@org.jetbrains.annotations.NotNull
|
|
public java.util.Iterator<T> iterator() { /* compiled code */ }
|
|
|
|
public boolean add(T element) { /* compiled code */ }
|
|
|
|
public void clear() { /* compiled code */ }
|
|
|
|
public boolean contains(java.lang.Object element) { /* compiled code */ }
|
|
|
|
private SmartSet() { /* compiled code */ }
|
|
|
|
@kotlin.jvm.JvmStatic
|
|
@org.jetbrains.annotations.NotNull
|
|
public static final <T> SmartSet<T> create() { /* compiled code */ }
|
|
|
|
@kotlin.jvm.JvmStatic
|
|
@org.jetbrains.annotations.NotNull
|
|
public static final <T> SmartSet<T> create(@org.jetbrains.annotations.NotNull java.util.Collection<? extends T> set) { /* compiled code */ }
|
|
|
|
public static final class Companion {
|
|
private final int getARRAY_THRESHOLD() { /* compiled code */ }
|
|
|
|
@kotlin.jvm.JvmStatic
|
|
@org.jetbrains.annotations.NotNull
|
|
public final <T> SmartSet<T> create() { /* compiled code */ }
|
|
|
|
@kotlin.jvm.JvmStatic
|
|
@org.jetbrains.annotations.NotNull
|
|
public final <T> SmartSet<T> create(@org.jetbrains.annotations.NotNull java.util.Collection<? extends T> set) { /* compiled code */ }
|
|
|
|
private Companion() { /* compiled code */ }
|
|
}
|
|
}
|