Mercurial > projects > dwt2
comparison base/src/java/lang/Long.d @ 99:5d5bd660917f
build some databind snippets
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 22 Apr 2009 18:59:26 +0200 |
parents | 9e0ab372d5d8 |
children | 536e43f63c81 |
comparison
equal
deleted
inserted
replaced
98:48d4ee626868 | 99:5d5bd660917f |
---|---|
1 module java.lang.Long; | 1 module java.lang.Long; |
2 | 2 |
3 import java.lang.util; | 3 import java.lang.util; |
4 import java.lang.exceptions; | |
4 import java.lang.Number; | 5 import java.lang.Number; |
5 import java.lang.Class; | 6 import java.lang.Class; |
6 | 7 |
7 class Long : Number { | 8 class Long : Number { |
8 public static const long MIN_VALUE = long.min; | 9 public static const long MIN_VALUE = long.min; |
38 | 39 |
39 public double doubleValue(){ | 40 public double doubleValue(){ |
40 return cast(double)value; | 41 return cast(double)value; |
41 } | 42 } |
42 public static long parseLong(String s){ | 43 public static long parseLong(String s){ |
43 implMissing( __FILE__, __LINE__ ); | 44 return parseLong( s, 10 ); |
44 return 0; | 45 } |
46 public static long parseLong(String s, int radix){ | |
47 version(Tango){ | |
48 try{ | |
49 return tango.text.convert.Integer.toLong( s, radix ); | |
50 } | |
51 catch( IllegalArgumentException e ){ | |
52 throw new NumberFormatException( e ); | |
53 } | |
54 } else { // Phobos | |
55 implMissing( __FILE__, __LINE__ ); | |
56 return 0; | |
57 } | |
45 } | 58 } |
46 public static String toString( double value ){ | 59 public static String toString( double value ){ |
47 implMissing( __FILE__, __LINE__ ); | 60 implMissing( __FILE__, __LINE__ ); |
48 return null; | 61 return null; |
49 } | 62 } |