dbl -> toDouble

This commit is contained in:
Alex Tkachman
2012-02-22 13:14:41 +02:00
parent 18990e2c1b
commit 53bba59a4f
79 changed files with 335 additions and 298 deletions
+7 -7
View File
@@ -1,13 +1,13 @@
package jet
abstract class Number : Hashable {
abstract val double : Double
abstract val float : Float
abstract val long : Long
abstract val int : Int
abstract val char : Char
abstract val short : Short
abstract val byte : Byte
abstract fun toDouble() : Double
abstract fun toFloat() : Float
abstract fun toLong() : Long
abstract fun toInt() : Int
abstract fun toChar() : Char
abstract fun toShort() : Short
abstract fun toByte() : Byte
// fun equals(other : Double) : Boolean
// fun equals(other : Float) : Boolean
// fun equals(other : Long) : Boolean
@@ -59,6 +59,6 @@ public class ByteValue implements CompileTimeConstant<Byte> {
@Override
public String toString() {
return value + ".byte";
return value + ".toByte()";
}
}
@@ -49,6 +49,6 @@ public class DoubleValue implements CompileTimeConstant<Double> {
@Override
public String toString() {
return value + ".double";
return value + ".toDouble()";
}
}
@@ -49,6 +49,6 @@ public class FloatValue implements CompileTimeConstant<Float> {
@Override
public String toString() {
return value + ".float";
return value + ".toFloat()";
}
}
@@ -59,7 +59,7 @@ public class IntValue implements CompileTimeConstant<Integer> {
@Override
public String toString() {
return value + ".int";
return value + ".toInt()";
}
@Override
@@ -58,6 +58,6 @@ public class LongValue implements CompileTimeConstant<Long> {
@Override
public String toString() {
return value + ".long";
return value + ".toLong()";
}
}
@@ -59,7 +59,7 @@ public class ShortValue implements CompileTimeConstant<Short> {
@Override
public String toString() {
return value + ".short";
return value + ".toShort()";
}
}
@@ -36,13 +36,13 @@ public class OperatorConventions {
private OperatorConventions() {}
// Names for primitive type conversion properties
public static final String DOUBLE = "double";
public static final String FLOAT = "float";
public static final String LONG = "long";
public static final String INT = "int";
public static final String CHAR = "char";
public static final String SHORT = "short";
public static final String BYTE = "byte";
public static final String DOUBLE = "toDouble";
public static final String FLOAT = "toFloat";
public static final String LONG = "toLong";
public static final String INT = "toInt";
public static final String CHAR = "toChar";
public static final String SHORT = "toShort";
public static final String BYTE = "toByte";
public static final ImmutableSet<String> NUMBER_CONVERSIONS = ImmutableSet.of(