Mercurial > projects > dwt-win
comparison dwt/dwthelper/utils.d @ 200:fef1e3b37378
sync with dwt-linux
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 11 Apr 2008 17:15:55 +0200 |
parents | 3d5dbb27dec2 |
children | 6293c40673a4 |
comparison
equal
deleted
inserted
replaced
199:3d5dbb27dec2 | 200:fef1e3b37378 |
---|---|
70 } | 70 } |
71 | 71 |
72 class Boolean : ValueWrapperT!(bool) { | 72 class Boolean : ValueWrapperT!(bool) { |
73 public static Boolean TRUE; | 73 public static Boolean TRUE; |
74 public static Boolean FALSE; | 74 public static Boolean FALSE; |
75 | |
76 static this(){ | |
77 TRUE = new Boolean(true); | |
78 FALSE = new Boolean(false); | |
79 } | |
75 public this( bool v ){ | 80 public this( bool v ){ |
76 super(v); | 81 super(v); |
77 } | 82 } |
78 | 83 |
79 alias ValueWrapperT!(bool).opEquals opEquals; | 84 alias ValueWrapperT!(bool).opEquals opEquals; |
123 public this ( int value ){ | 128 public this ( int value ){ |
124 super( value ); | 129 super( value ); |
125 } | 130 } |
126 | 131 |
127 public this ( char[] s ){ | 132 public this ( char[] s ){ |
128 implMissing( __FILE__, __LINE__ ); | 133 super(parseInt(s)); |
129 super(0); | |
130 } | 134 } |
131 | 135 |
132 public static char[] toString( int i, int radix ){ | 136 public static char[] toString( int i, int radix ){ |
133 switch( radix ){ | 137 switch( radix ){ |
134 case 2: | 138 case 2: |
183 implMissing( __FILE__, __LINE__ ); | 187 implMissing( __FILE__, __LINE__ ); |
184 return null; | 188 return null; |
185 } | 189 } |
186 | 190 |
187 public static Integer valueOf( char[] s ){ | 191 public static Integer valueOf( char[] s ){ |
188 implMissing( __FILE__, __LINE__ ); | 192 return valueOf( parseInt(s)); |
189 return null; | |
190 } | 193 } |
191 | 194 |
192 public static Integer valueOf( int i ){ | 195 public static Integer valueOf( int i ){ |
193 implMissing( __FILE__, __LINE__ ); | 196 return new Integer(i); |
194 return null; | |
195 } | 197 } |
196 | 198 |
197 public byte byteValue(){ | 199 public byte byteValue(){ |
198 return cast(byte)value; | 200 return cast(byte)value; |
199 } | 201 } |
859 if( a[i] != b[i] ){ | 861 if( a[i] != b[i] ){ |
860 return false; | 862 return false; |
861 } | 863 } |
862 } | 864 } |
863 } | 865 } |
866 return true; | |
864 } | 867 } |
865 | 868 |
866 class Arrays{ | 869 class Arrays{ |
867 public static bool equals(Object[] a, Object[] b){ | 870 public static bool equals(Object[] a, Object[] b){ |
868 if( a.length !is b.length ){ | 871 if( a.length !is b.length ){ |