Mercurial > projects > dwt2
view java/src/java/lang/Byte.d @ 2:712ffca654f3
Moved java classes to their correct location
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 04 Mar 2009 21:41:18 +0100 |
parents | 6dd524f61e62 |
children | 9b96950f2c3c |
line wrap: on
line source
module java.lang.Byte; import java.lang.util; import java.lang.exceptions; class Byte : ValueWrapperT!(byte) { public static byte parseByte( String s ){ try{ int res = tango.text.convert.Integer.parse( s ); if( res < byte.min || res > byte.max ){ throw new NumberFormatException( "out of range" ); } return res; } catch( IllegalArgumentException e ){ throw new NumberFormatException( e ); } } this( byte value ){ super( value ); } public static String toString( byte i ){ return tango.text.convert.Integer.toString(i); } } alias Byte ValueWrapperByte;