diff --git a/idea/src/jet/lang/Library.jet b/idea/src/jet/lang/Library.jet index 2ebdea6d192..acd9e67621e 100644 --- a/idea/src/jet/lang/Library.jet +++ b/idea/src/jet/lang/Library.jet @@ -20,8 +20,22 @@ class String : Comparable { fun plus(other : Any?) : String } +class Range> { + fun contains(item : T) : Boolean +} + class Double : Comparable { fun plus(other : Double) : Double + + fun minus(other : Double) : Double + + fun times(other : Double) : Double + + fun div(other : Double) : Double + + fun mod(other : Double) : Double + + fun rangeTo(other : Double) : Range } class Float : Comparable { @@ -29,6 +43,21 @@ class Float : Comparable { fun plus(other : Double) : Double fun plus(other : Float) : Float + + fun minus(other : Double) : Double + fun minus(other : Float) : Float + + fun times(other : Double) : Double + fun times(other : Float) : Float + + fun div(other : Double) : Double + fun div(other : Float) : Float + + fun mod(other : Double) : Double + fun mod(other : Float) : Float + + fun rangeTo(other : Double) : Range + fun rangeTo(other : Float) : Range } class Long : Comparable { @@ -38,6 +67,26 @@ class Long : Comparable { fun plus(other : Double) : Double fun plus(other : Float) : Float fun plus(other : Long) : Long + + fun minus(other : Double) : Double + fun minus(other : Float) : Float + fun minus(other : Long) : Long + + fun times(other : Double) : Double + fun times(other : Float) : Float + fun times(other : Long) : Long + + fun div(other : Double) : Double + fun div(other : Float) : Float + fun div(other : Long) : Long + + fun mod(other : Double) : Double + fun mod(other : Float) : Float + fun mod(other : Long) : Long + + fun rangeTo(other : Double) : Range + fun rangeTo(other : Float) : Range + fun rangeTo(other : Long) : Range } class Int : Comparable { @@ -49,6 +98,31 @@ class Int : Comparable { fun plus(other : Float) : Float fun plus(other : Long) : Long fun plus(other : Int) : Int + + fun minus(other : Double) : Double + fun minus(other : Float) : Float + fun minus(other : Long) : Long + fun minus(other : Int) : Int + + fun times(other : Double) : Double + fun times(other : Float) : Float + fun times(other : Long) : Long + fun times(other : Int) : Int + + fun div(other : Double) : Double + fun div(other : Float) : Float + fun div(other : Long) : Long + fun div(other : Int) : Int + + fun mod(other : Double) : Double + fun mod(other : Float) : Float + fun mod(other : Long) : Long + fun mod(other : Int) : Int + + fun rangeTo(other : Double) : Range + fun rangeTo(other : Float) : Range + fun rangeTo(other : Long) : Range + fun rangeTo(other : Int) : Range } class Char : Comparable { @@ -62,6 +136,36 @@ class Char : Comparable { fun plus(other : Long) : Long fun plus(other : Int) : Int fun plus(other : Char) : Char + + fun minus(other : Double) : Double + fun minus(other : Float) : Float + fun minus(other : Long) : Long + fun minus(other : Int) : Int + fun minus(other : Char) : Char + + fun times(other : Double) : Double + fun times(other : Float) : Float + fun times(other : Long) : Long + fun times(other : Int) : Int + fun times(other : Char) : Char + + fun div(other : Double) : Double + fun div(other : Float) : Float + fun div(other : Long) : Long + fun div(other : Int) : Int + fun div(other : Char) : Char + + fun mod(other : Double) : Double + fun mod(other : Float) : Float + fun mod(other : Long) : Long + fun mod(other : Int) : Int + fun mod(other : Char) : Char + + fun rangeTo(other : Double) : Range + fun rangeTo(other : Float) : Range + fun rangeTo(other : Long) : Range + fun rangeTo(other : Int) : Range + fun rangeTo(other : Char) : Range } class Short : Comparable { @@ -75,6 +179,36 @@ class Short : Comparable { fun plus(other : Long) : Long fun plus(other : Int) : Int fun plus(other : Short) : Short + + fun minus(other : Double) : Double + fun minus(other : Float) : Float + fun minus(other : Long) : Long + fun minus(other : Int) : Int + fun minus(other : Short) : Short + + fun times(other : Double) : Double + fun times(other : Float) : Float + fun times(other : Long) : Long + fun times(other : Int) : Int + fun times(other : Short) : Short + + fun div(other : Double) : Double + fun div(other : Float) : Float + fun div(other : Long) : Long + fun div(other : Int) : Int + fun div(other : Short) : Short + + fun mod(other : Double) : Double + fun mod(other : Float) : Float + fun mod(other : Long) : Long + fun mod(other : Int) : Int + fun mod(other : Short) : Short + + fun rangeTo(other : Double) : Range + fun rangeTo(other : Float) : Range + fun rangeTo(other : Long) : Range + fun rangeTo(other : Int) : Range + fun rangeTo(other : Short) : Range } class Byte : Comparable { @@ -90,4 +224,39 @@ class Byte : Comparable { fun plus(other : Int) : Int fun plus(other : Short) : Short fun plus(other : Byte) : Byte + + fun minus(other : Double) : Double + fun minus(other : Float) : Float + fun minus(other : Long) : Long + fun minus(other : Int) : Int + fun minus(other : Short) : Short + fun minus(other : Byte) : Byte + + fun times(other : Double) : Double + fun times(other : Float) : Float + fun times(other : Long) : Long + fun times(other : Int) : Int + fun times(other : Short) : Short + fun times(other : Byte) : Byte + + fun div(other : Double) : Double + fun div(other : Float) : Float + fun div(other : Long) : Long + fun div(other : Int) : Int + fun div(other : Short) : Short + fun div(other : Byte) : Byte + + fun mod(other : Double) : Double + fun mod(other : Float) : Float + fun mod(other : Long) : Long + fun mod(other : Int) : Int + fun mod(other : Short) : Short + fun mod(other : Byte) : Byte + + fun rangeTo(other : Double) : Range + fun rangeTo(other : Float) : Range + fun rangeTo(other : Long) : Range + fun rangeTo(other : Int) : Range + fun rangeTo(other : Short) : Range + fun rangeTo(other : Byte) : Range } \ No newline at end of file