KT-987 Unboxing_nulls: Kotlinized versions of basic Java collections
This commit is contained in:
Generated
+1
@@ -0,0 +1 @@
|
||||
jdk-headers
|
||||
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AntConfiguration">
|
||||
<defaultAnt bundledAnt="true" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact build-on-make="true" name="jdk-headers:jar">
|
||||
<output-path>$PROJECT_DIR$</output-path>
|
||||
<root id="root">
|
||||
<element id="archive" name="jdk-headers.jar">
|
||||
<element id="directory" name="META-INF">
|
||||
<element id="file-copy" path="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" />
|
||||
</element>
|
||||
<element id="module-output" name="jdk-headers" />
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
Generated
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="?*.properties" />
|
||||
<entry name="?*.xml" />
|
||||
<entry name="?*.gif" />
|
||||
<entry name="?*.png" />
|
||||
<entry name="?*.jpeg" />
|
||||
<entry name="?*.jpg" />
|
||||
<entry name="?*.html" />
|
||||
<entry name="?*.dtd" />
|
||||
<entry name="?*.tld" />
|
||||
<entry name="?*.ftl" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing enabled="false" useClasspath="true" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="">
|
||||
<module2copyright />
|
||||
</settings>
|
||||
</component>
|
||||
Generated
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
|
||||
</project>
|
||||
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/jdk-headers.iml" filepath="$PROJECT_DIR$/jdk-headers.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/test/test.iml" filepath="$PROJECT_DIR$/test/test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
||||
Generated
+125
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Manifest-Version: 1.0
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package java.lang
|
||||
|
||||
public trait Iterable<erased T> {
|
||||
fun iterator() : java.util.Iterator<T>
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package java.util
|
||||
abstract public open class AbstractCollection<erased E> protected () : java.util.Collection<E>, java.lang.Object {
|
||||
abstract override public fun iterator() : java.util.Iterator<E>
|
||||
abstract override public fun size() : Int
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun toArray() : Array<Any?> {}
|
||||
override public fun toArray<erased T>(a : Array<out T>) : Array<T> {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun containsAll(c : java.util.Collection<*>) : Boolean {}
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun removeAll(c : java.util.Collection<*>) : Boolean {}
|
||||
override public fun retainAll(c : java.util.Collection<*>) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
//override public fun toString() : java.lang.String {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package java.util
|
||||
abstract public open class AbstractList<erased E> protected () : java.util.AbstractCollection<E>(), java.util.List<E> {
|
||||
override public fun add(e : E) : Boolean {}
|
||||
abstract override public fun get(index : Int) : E
|
||||
override public fun set(index : Int, element : E) : E {}
|
||||
override public fun add(index : Int, element : E) : Unit {}
|
||||
override public fun remove(index : Int) : E {}
|
||||
override public fun indexOf(o : Any?) : Int {}
|
||||
override public fun lastIndexOf(o : Any?) : Int {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun iterator() : java.util.Iterator<E> {}
|
||||
override public fun listIterator() : java.util.ListIterator<E> {}
|
||||
override public fun listIterator(index : Int) : java.util.ListIterator<E> {}
|
||||
override public fun subList(fromIndex : Int, toIndex : Int) : java.util.List<E> {}
|
||||
// override public fun equals(o : Any?) : Boolean
|
||||
// override public fun hashCode() : Int
|
||||
open protected fun removeRange(fromIndex : Int, toIndex : Int) : Unit {}
|
||||
protected var modCount : Int = 0
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package java.util
|
||||
|
||||
import java.util.Map.Entry
|
||||
|
||||
abstract public open class AbstractMap<erased K, erased V> protected () : java.util.Map<K, V>, java.lang.Object {
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun containsValue(value : Any?) : Boolean {}
|
||||
override public fun containsKey(key : Any?) : Boolean {}
|
||||
override public fun get(key : Any?) : V? {}
|
||||
override public fun put(key : K, value : V) : V? {}
|
||||
override public fun remove(key : Any?) : V? {}
|
||||
override public fun putAll(m : java.util.Map<out K, out V>) : Unit {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun keySet() : java.util.Set<K> {}
|
||||
override public fun values() : java.util.Collection<V> {}
|
||||
abstract override public fun entrySet() : java.util.Set<java.util.Map.Entry<K, V>>
|
||||
//override public fun equals(o : Any?) : Boolean
|
||||
//override public fun hashCode() : Int
|
||||
//override public fun toString() : java.lang.String?
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package java.util
|
||||
abstract public open class AbstractSequentialList<erased E> protected () : java.util.AbstractList<E>(), java.lang.Object {
|
||||
override public fun get(index : Int) : E {}
|
||||
override public fun set(index : Int, element : E) : E {}
|
||||
override public fun add(index : Int, element : E) : Unit {}
|
||||
override public fun remove(index : Int) : E {}
|
||||
override public fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun iterator() : java.util.Iterator<E> {}
|
||||
abstract override public fun listIterator(index : Int) : java.util.ListIterator<E> {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package java.util
|
||||
abstract public open class AbstractSet<erased E> protected () : java.util.AbstractCollection<E>(), java.util.Set<E>, java.lang.Object {
|
||||
// override public fun equals(o : Any?) : Boolean
|
||||
// override public fun hashCode() : Int
|
||||
override public fun removeAll(c : java.util.Collection<*>) : Boolean {}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package java.util
|
||||
public open class ArrayList<erased E>(c : java.util.Collection<out E>) : java.util.AbstractList<E>(),
|
||||
java.util.List<E>,
|
||||
java.util.RandomAccess,
|
||||
java.lang.Cloneable,
|
||||
java.io.Serializable,
|
||||
java.lang.Object {
|
||||
public this() {}
|
||||
public this(initialCapacity : Int) {}
|
||||
open public fun trimToSize() : Unit {}
|
||||
open public fun ensureCapacity(minCapacity : Int) : Unit {}
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun indexOf(o : Any?) : Int {}
|
||||
override public fun lastIndexOf(o : Any?) : Int {}
|
||||
override public fun clone() : java.lang.Object {}
|
||||
override public fun toArray() : Array<Any?> {}
|
||||
override public fun toArray<erased T>(a : Array<out T>) : Array<T> {}
|
||||
override public fun get(index : Int) : E {}
|
||||
override public fun set(index : Int, element : E) : E {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun add(index : Int, element : E) : Unit {}
|
||||
override public fun remove(index : Int) : E {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean {}
|
||||
override protected fun removeRange(fromIndex : Int, toIndex : Int) : Unit {}
|
||||
// class object {
|
||||
// open public fun init<E>() : ArrayList<E> {
|
||||
// return __
|
||||
// }
|
||||
// open public fun init<E>(c : java.util.Collection<out E?>?) : ArrayList<E> {
|
||||
// return __
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package java.util
|
||||
public trait Collection<erased E> : java.lang.Iterable<E> {
|
||||
open fun size() : Int
|
||||
open fun isEmpty() : Boolean
|
||||
open fun contains(o : Any?) : Boolean
|
||||
override fun iterator() : java.util.Iterator<E>
|
||||
open fun toArray() : Array<Any?>
|
||||
// a : Array<out T> to emulate Java's array covariance
|
||||
open fun toArray<erased T>(a : Array<out T>) : Array<T>
|
||||
open fun add(e : E) : Boolean
|
||||
open fun remove(o : Any?) : Boolean
|
||||
open fun containsAll(c : java.util.Collection<*>) : Boolean
|
||||
open fun addAll(c : java.util.Collection<out E>) : Boolean
|
||||
open fun removeAll(c : java.util.Collection<*>) : Boolean
|
||||
open fun retainAll(c : java.util.Collection<*>) : Boolean
|
||||
open fun clear() : Unit
|
||||
|
||||
// override fun equals(o : Any?) : Boolean
|
||||
// override fun hashCode() : Int
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package java.util
|
||||
public trait Deque<erased E> : java.util.Queue<E> {
|
||||
open fun addFirst(e : E) : Unit
|
||||
open fun addLast(e : E) : Unit
|
||||
open fun offerFirst(e : E) : Boolean
|
||||
open fun offerLast(e : E) : Boolean
|
||||
open fun removeFirst() : E
|
||||
open fun removeLast() : E
|
||||
open fun pollFirst() : E?
|
||||
open fun pollLast() : E?
|
||||
open fun getFirst() : E
|
||||
open fun getLast() : E
|
||||
open fun peekFirst() : E?
|
||||
open fun peekLast() : E?
|
||||
open fun removeFirstOccurrence(o : Any?) : Boolean
|
||||
open fun removeLastOccurrence(o : Any?) : Boolean
|
||||
override fun add(e : E) : Boolean
|
||||
override fun offer(e : E) : Boolean
|
||||
override fun remove() : E
|
||||
override fun poll() : E?
|
||||
override fun element() : E
|
||||
override fun peek() : E?
|
||||
open fun push(e : E) : Unit
|
||||
open fun pop() : E
|
||||
override fun remove(o : Any?) : Boolean
|
||||
override fun contains(o : Any?) : Boolean
|
||||
override public fun size() : Int
|
||||
override fun iterator() : java.util.Iterator<E>
|
||||
open fun descendingIterator() : java.util.Iterator<E>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package java.util
|
||||
public trait Enumeration<erased E> {
|
||||
open fun hasMoreElements() : Boolean
|
||||
open fun nextElement() : E
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package java.util
|
||||
import java.io.*
|
||||
public open class HashMap<erased K, erased V>(m : java.util.Map<out K, out V>) : java.util.AbstractMap<K, V>(),
|
||||
java.util.Map<K, V>,
|
||||
java.lang.Cloneable,
|
||||
java.io.Serializable,
|
||||
java.lang.Object {
|
||||
public this() {}
|
||||
public this(initialCapacity : Int) {}
|
||||
public this(initialCapacity : Int, loadFactor : Float) {}
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun get(key : Any?) : V? {}
|
||||
override public fun containsKey(key : Any?) : Boolean {}
|
||||
override public fun put(key : K, value : V) : V? {}
|
||||
override public fun putAll(m : java.util.Map<out K, out V>) : Unit {}
|
||||
override public fun remove(key : Any?) : V? {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun containsValue(value : Any?) : Boolean {}
|
||||
override public fun clone() : Any? {}
|
||||
override public fun keySet() : java.util.Set<K> {}
|
||||
override public fun values() : java.util.Collection<V> {}
|
||||
override public fun entrySet() : java.util.Set<java.util.Map.Entry<K, V>> {}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package java.util
|
||||
public open class HashSet<erased E>(c : java.util.Collection<out E>) : java.util.AbstractSet<E>(),
|
||||
java.util.Set<E>,
|
||||
java.lang.Cloneable,
|
||||
java.io.Serializable,
|
||||
java.lang.Object {
|
||||
public this() {}
|
||||
public this(initialCapacity : Int) {}
|
||||
public this(initialCapacity : Int, loadFactor : Float) {}
|
||||
override public fun iterator() : java.util.Iterator<E> {}
|
||||
override public fun size() : Int {}
|
||||
override public fun isEmpty() : Boolean {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun clone() : Any? {}
|
||||
//class object {
|
||||
//open public fun init<E>() : HashSet<E> {
|
||||
//val __ = HashSet(0, null, null)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<E>(c : java.util.Collection<out E?>?) : HashSet<E> {
|
||||
//val __ = HashSet(0, null, null)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<E>(initialCapacity : Int, loadFactor : Float) : HashSet<E> {
|
||||
//val __ = HashSet(0, null, null)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<E>(initialCapacity : Int) : HashSet<E> {
|
||||
//val __ = HashSet(0, null, null)
|
||||
//return __
|
||||
//}
|
||||
//open fun init<E>(initialCapacity : Int, loadFactor : Float, dummy : Boolean) : HashSet<E> {
|
||||
//val __ = HashSet(0, null, null)
|
||||
//return __
|
||||
//}
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package java.util
|
||||
|
||||
public trait Iterator<erased E> {
|
||||
fun hasNext() : Boolean
|
||||
fun next() : E
|
||||
fun remove() : Unit
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package java.util
|
||||
import java.io.*
|
||||
public open class LinkedHashMap<erased K, erased V>(m : java.util.Map<out K, out V>) : java.util.HashMap<K, V>(), java.util.Map<K, V>, java.lang.Object {
|
||||
public this(initialCapacity : Int, loadFactor : Float) {}
|
||||
public this(initialCapacity : Int) {}
|
||||
public this() {}
|
||||
|
||||
override public fun containsValue(value : Any?) : Boolean {}
|
||||
override public fun get(key : Any?) : V? {}
|
||||
override public fun clear() : Unit {}
|
||||
open protected fun removeEldestEntry(eldest : java.util.Map.Entry<K, V>) : Boolean {}
|
||||
//class object {
|
||||
//open public fun init<K, V>(initialCapacity : Int, loadFactor : Float) : LinkedHashMap<K, V> {
|
||||
//val __ = LinkedHashMap(0, null, false)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<K, V>(initialCapacity : Int) : LinkedHashMap<K, V> {
|
||||
//val __ = LinkedHashMap(0, null, false)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<K, V>() : LinkedHashMap<K, V> {
|
||||
//val __ = LinkedHashMap(0, null, false)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<K, V>(m : java.util.Map<out K?, out V?>?) : LinkedHashMap<K, V> {
|
||||
//val __ = LinkedHashMap(0, null, false)
|
||||
//return __
|
||||
//}
|
||||
//open public fun init<K, V>(initialCapacity : Int, loadFactor : Float, accessOrder : Boolean) : LinkedHashMap<K, V> {
|
||||
//val __ = LinkedHashMap(0, null, false)
|
||||
//return __
|
||||
//}
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package java.util
|
||||
public open class LinkedHashSet<erased E>(c : java.util.Collection<out E>) : java.util.HashSet<E>(c),
|
||||
java.util.Set<E>,
|
||||
java.lang.Cloneable,
|
||||
java.io.Serializable,
|
||||
java.lang.Object {
|
||||
public this(initialCapacity : Int, loadFactor : Float) {}
|
||||
public this(initialCapacity : Int) {}
|
||||
public this() {}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package java.util
|
||||
public open class LinkedList<erased E>(c : java.util.Collection<out E>) : java.util.AbstractSequentialList<E>(),
|
||||
java.util.List<E>,
|
||||
java.util.Deque<E>,
|
||||
java.lang.Cloneable,
|
||||
java.io.Serializable,
|
||||
java.lang.Object {
|
||||
public this() {}
|
||||
|
||||
override public fun getFirst() : E {}
|
||||
override public fun getLast() : E {}
|
||||
override public fun removeFirst() : E {}
|
||||
override public fun removeLast() : E {}
|
||||
override public fun addFirst(e : E) : Unit {}
|
||||
override public fun addLast(e : E) : Unit {}
|
||||
override public fun contains(o : Any?) : Boolean {}
|
||||
override public fun size() : Int {}
|
||||
override public fun add(e : E) : Boolean {}
|
||||
override public fun remove(o : Any?) : Boolean {}
|
||||
override public fun addAll(c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean {}
|
||||
override public fun clear() : Unit {}
|
||||
override public fun get(index : Int) : E {}
|
||||
override public fun set(index : Int, element : E) : E {}
|
||||
override public fun add(index : Int, element : E) : Unit {}
|
||||
override public fun remove(index : Int) : E {}
|
||||
override public fun indexOf(o : Any?) : Int {}
|
||||
override public fun lastIndexOf(o : Any?) : Int {}
|
||||
override public fun peek() : E? {}
|
||||
override public fun element() : E {}
|
||||
override public fun poll() : E? {}
|
||||
override public fun remove() : E {}
|
||||
override public fun offer(e : E) : Boolean {}
|
||||
override public fun offerFirst(e : E) : Boolean {}
|
||||
override public fun offerLast(e : E) : Boolean {}
|
||||
override public fun peekFirst() : E? {}
|
||||
override public fun peekLast() : E? {}
|
||||
override public fun pollFirst() : E? {}
|
||||
override public fun pollLast() : E? {}
|
||||
override public fun push(e : E) : Unit {}
|
||||
override public fun pop() : E {}
|
||||
override public fun removeFirstOccurrence(o : Any?) : Boolean {}
|
||||
override public fun removeLastOccurrence(o : Any?) : Boolean {}
|
||||
override public fun listIterator(index : Int) : java.util.ListIterator<E> {}
|
||||
override public fun descendingIterator() : java.util.Iterator<E> {}
|
||||
override public fun clone() : Any? {}
|
||||
override public fun toArray() : Array<Any?> {}
|
||||
override public fun toArray<erased T>(a : Array<out T>) : Array<T> {}
|
||||
//class object {
|
||||
//open public fun init<E>(c : java.util.Collection<out E?>?) : LinkedList<E> {
|
||||
//return __
|
||||
//}
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package java.util
|
||||
public trait List<erased E> : java.util.Collection<E> {
|
||||
override fun size() : Int
|
||||
override fun isEmpty() : Boolean
|
||||
override fun contains(o : Any?) : Boolean
|
||||
override fun iterator() : java.util.Iterator<E>
|
||||
override fun toArray() : Array<Any?>
|
||||
// Simulate Java's array covariance
|
||||
override fun toArray<erased T>(a : Array<out T>) : Array<T>
|
||||
override fun add(e : E) : Boolean
|
||||
override fun remove(o : Any?) : Boolean
|
||||
override fun containsAll(c : java.util.Collection<*>) : Boolean
|
||||
override fun addAll(c : java.util.Collection<out E>) : Boolean
|
||||
open fun addAll(index : Int, c : java.util.Collection<out E>) : Boolean
|
||||
override fun removeAll(c : java.util.Collection<*>) : Boolean
|
||||
override fun retainAll(c : java.util.Collection<*>) : Boolean
|
||||
override fun clear() : Unit
|
||||
// override fun equals(o : Any?) : Boolean
|
||||
// override fun hashCode() : Int
|
||||
open fun get(index : Int) : E
|
||||
open fun set(index : Int, element : E) : E
|
||||
open fun add(index : Int, element : E) : Unit
|
||||
open fun remove(index : Int) : E
|
||||
open fun indexOf(o : Any?) : Int
|
||||
open fun lastIndexOf(o : Any?) : Int
|
||||
open fun listIterator() : java.util.ListIterator<E>
|
||||
open fun listIterator(index : Int) : java.util.ListIterator<E>
|
||||
open fun subList(fromIndex : Int, toIndex : Int) : java.util.List<E>
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package java.util
|
||||
|
||||
public trait Map<erased K, erased V> {
|
||||
open fun size() : Int
|
||||
open fun isEmpty() : Boolean
|
||||
open fun containsKey(key : Any?) : Boolean
|
||||
open fun containsValue(value : Any?) : Boolean
|
||||
open fun get(key : Any?) : V?
|
||||
open fun put(key : K, value : V) : V?
|
||||
open fun remove(key : Any?) : V?
|
||||
open fun putAll(m : java.util.Map<out K, out V>) : Unit
|
||||
open fun clear() : Unit
|
||||
open fun keySet() : java.util.Set<K>
|
||||
open fun values() : java.util.Collection<V>
|
||||
open fun entrySet() : java.util.Set<java.util.Map.Entry<K, V>>
|
||||
// open fun equals(o : Any?) : Boolean
|
||||
// open fun hashCode() : Int
|
||||
|
||||
class object {
|
||||
trait Entry<K, V> {
|
||||
open fun getKey() : K
|
||||
open fun getValue() : V
|
||||
open fun setValue(value : V) : V
|
||||
// open fun equals(o : Any?) : Boolean
|
||||
// open fun hashCode() : Int
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package java.util
|
||||
public trait Queue<erased E> : java.util.Collection<E> {
|
||||
override fun add(e : E) : Boolean
|
||||
open fun offer(e : E) : Boolean
|
||||
open fun remove() : E
|
||||
open fun poll() : E?
|
||||
open fun element() : E
|
||||
open fun peek() : E?
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package java.util
|
||||
public trait Set<erased E> : java.util.Collection<E> {
|
||||
override fun size() : Int
|
||||
override fun isEmpty() : Boolean
|
||||
override fun contains(o : Any?) : Boolean
|
||||
override fun iterator() : java.util.Iterator<E>
|
||||
override fun toArray() : Array<Any?>
|
||||
|
||||
// Simulate Java's array covariance
|
||||
override fun toArray<erased T>(a : Array<out T>) : Array<T>
|
||||
override fun add(e : E) : Boolean
|
||||
override fun remove(o : Any?) : Boolean
|
||||
override fun containsAll(c : java.util.Collection<*>) : Boolean
|
||||
override fun addAll(c : java.util.Collection<out E>) : Boolean
|
||||
override fun retainAll(c : java.util.Collection<*>) : Boolean
|
||||
override fun removeAll(c : java.util.Collection<*>) : Boolean
|
||||
override fun clear() : Unit
|
||||
// override fun equals(o : Any?) : Boolean
|
||||
// override fun hashCode() : Int
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="jdk-headers" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
Reference in New Issue
Block a user