Commits

Juha Komulainen committed 2564788

Updated to Kotlin M5.1.

Comments (0)

Files changed (10)

.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_0_5_1.xml

-<component name="libraryTable">
-  <library name="Maven: org.jetbrains.kotlin:kotlin-runtime:0.5.1">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-runtime/0.5.1/kotlin-runtime-0.5.1.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-runtime/0.5.1/kotlin-runtime-0.5.1-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-runtime/0.5.1/kotlin-runtime-0.5.1-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>

.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_runtime_0_5_162.xml

+<component name="libraryTable">
+  <library name="Maven: org.jetbrains.kotlin:kotlin-runtime:0.5.162">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-runtime/0.5.162/kotlin-runtime-0.5.162.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-runtime/0.5.162/kotlin-runtime-0.5.162-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-runtime/0.5.162/kotlin-runtime-0.5.162-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_0_5_1.xml

-<component name="libraryTable">
-  <library name="Maven: org.jetbrains.kotlin:kotlin-stdlib:0.5.1">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/0.5.1/kotlin-stdlib-0.5.1.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/0.5.1/kotlin-stdlib-0.5.1-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/0.5.1/kotlin-stdlib-0.5.1-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>

.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_0_5_162.xml

+<component name="libraryTable">
+  <library name="Maven: org.jetbrains.kotlin:kotlin-stdlib:0.5.162">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/0.5.162/kotlin-stdlib-0.5.162.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/0.5.162/kotlin-stdlib-0.5.162-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/0.5.162/kotlin-stdlib-0.5.162-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_swing_0_5_1.xml

-<component name="libraryTable">
-  <library name="Maven: org.jetbrains.kotlin:kotlin-swing:0.5.1">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-swing/0.5.1/kotlin-swing-0.5.1.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-swing/0.5.1/kotlin-swing-0.5.1-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-swing/0.5.1/kotlin-swing-0.5.1-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>

.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_swing_0_5_162.xml

+<component name="libraryTable">
+  <library name="Maven: org.jetbrains.kotlin:kotlin-swing:0.5.162">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-swing/0.5.162/kotlin-swing-0.5.162.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-swing/0.5.162/kotlin-swing-0.5.162-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-swing/0.5.162/kotlin-swing-0.5.162-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

contextual-kotlin.iml

       <sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
       <excludeFolder url="file://$MODULE_DIR$/target/classes" />
       <excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
+      <excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
+      <excludeFolder url="file://$MODULE_DIR$/target/surefire" />
     </content>
     <orderEntry type="jdk" jdkName="1.7" jdkType="JavaSDK" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:0.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-runtime:0.5.1" level="project" />
-    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-swing:0.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:0.5.162" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-runtime:0.5.162" level="project" />
+    <orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-swing:0.5.162" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
   </component>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <kotlin.version>0.5.1</kotlin.version>
+        <kotlin.version>0.5.162</kotlin.version>
     </properties>
 
     <dependencies>

src/main/kotlin/contextual/Rule.kt

 import java.awt.Shape
 import java.awt.geom.Ellipse2D
 import java.awt.geom.Rectangle2D
+import java.util.ArrayList
 
 public abstract class Rule {
     abstract fun process(ctx: Processor, state: DrawState, depth: Int)
 
 class RandomRule : Rule() {
 
-    val rules: MutableList<Pair<Int,Rule>> = arrayList<Pair<Int,Rule>>()
+    val rules: MutableList<Pair<Int,Rule>> = ArrayList<Pair<Int,Rule>>()
     var weightSum = 0
 
     override fun process(ctx: Processor, state: DrawState, depth: Int) =

src/main/kotlin/contextual/RuleParser.kt

 
 import java.io.File
 import java.lang.Character.isLetter
+import java.util.HashMap
 
 class RuleParser(private val input: String) {
 
 class ParseException(pos: Int, message: String) : RuntimeException("$pos: $message")
 
 class RuleMap {
-    private val ruleMap = hashMap<String,RandomRule>()
+    private val ruleMap = HashMap<String,RandomRule>()
 
     fun get(name: String) =
         ruleMap[name] ?: throw IllegalArgumentException("no such rule '$name'")