import rpi.goldsd.container.*; public class WrapperTest { public static void main ( String[] args ) { Bool B1 = new Bool(); Bool B2 = new Bool( true ); if ( B1.isEqualTo( B2 ) ) System.out.println( "ERROR!" ); if ( ! B1.isLessThan( B2 ) ) System.out.println( "ERROR!" ); System.out.println( "B1 is " + B1 + " and B2 is " + B2 + "." ); System.out.print( "B1 hashed is " + B1.hash() + " and B2 hashed is " ); System.out.println( B2.hash() + "." ); System.out.println(); Char C1 = new Char(); Char C2 = new Char( 'a' ); Char C3 = new Char( 'q' ); if ( C1.isEqualTo( C2 ) ) System.out.println( "ERROR!" ); if ( C3.isLessThan( C2 ) ) System.out.println( "ERROR!" ); System.out.println( "C1 is " + C1 + ", C2 is " + C2 + " and C3 is " + C3 + "." ); System.out.print( "C1 hashed is " + C1.hash() + ", C2 hashed is " + C2.hash() ); System.out.println( " and C3 hashed is " + C3.hash() + "." ); System.out.println( "Char.MAX_VALUE is (int) " + (int)Char.MAX_VALUE + "." ); System.out.println( "Char.MIN_VALUE is (int) " + (int)Char.MIN_VALUE + "." ); System.out.println(); Int I1 = new Int(); Int I2 = new Int( 23847 ); Int I3 = new Int( 923578 ); if ( I1.isEqualTo( I3 ) ) System.out.println( "ERROR!" ); if ( I3.isLessThan( I2 ) ) System.out.println( "ERROR!" ); System.out.println( "I1 is " + I1 + ", I2 is " + I2 + " and I3 is " + I3 + "." ); System.out.print( "I1 hashed is " + I1.hash() + ", I2 hashed is " + I2.hash() ); System.out.println( " and I3 hashed is " + I3.hash() + "." ); System.out.println( "Int.MAX_VALUE is " + Int.MAX_VALUE + "." ); System.out.println( "Int.MIN_VALUE is " + Int.MIN_VALUE + "." ); System.out.println(); Real R1 = new Real(); Real R2 = new Real( 23589.234897 ); Real R3 = new Real( 1478.839 ); if ( R1.isEqualTo( R3 ) ) System.out.println( "ERROR!" ); if ( R2.isLessThan( R3 ) ) System.out.println( "ERROR!" ); System.out.println( "R1 is " + R1 + ", R2 is " + R2 + " and R3 is " + R3 + "." ); System.out.print( "R1 hashed is " + R1.hash() + ", R2 hashed is " + R2.hash() ); System.out.println( " and R3 hashed is " + R3.hash() + "." ); System.out.println( "Real.MAX_VALUE is " + Real.MAX_VALUE + "." ); System.out.println( "Real.MIN_VALUE is " + Real.MIN_VALUE + "." ); System.out.println(); Str S1 = new Str(); Str S2 = new Str( "Now is the time." ); Str S3 = new Str( "No time like the present." ); if ( S1.isEqualTo( S3 ) ) System.out.println( "ERROR!" ); if ( S2.isLessThan( S3 ) ) System.out.println( "ERROR!" ); System.out.println( "S1 is [" + S1 + "], S2 is [" + S2 + "] and S3 is [" + S3 + "]." ); System.out.print( "S1 hashed is " + S1.hash() + ", S2 hashed is " + S2.hash() ); System.out.println( " and S3 hashed is " + S3.hash() + "." ); } }