public void dumpResults ( PrintStream out ) throws IOException { PrintfFormat fmt = new PrintfFormat ( "%7.2f\t%s\t%s\n" ) ; for ( int i = 0 ; i < pairs . length ; i ++ ) { if ( pairs [ i ] != null ) { String aText = ( pairs [ i ] . getA ( ) == null ) ? "***" : pairs [ i ] . getA ( ) . unwrap ( ) ; String bText = ( pairs [ i ] . getB ( ) == null ) ? "***" : pairs [ i ] . getB ( ) . unwrap ( ) ; out . print ( fmt . sprintf ( new Object [ ] { new Double ( pairs [ i ] . getDistance ( ) ) , aText , bText } ) ) ; } } }
Show results in an easily machine - readable format .