public static String formatXY ( List < Discrete . Pair > xy , String prefix , String innerSeparator , String suffix , String outerSeparator ) { StringBuilder result = new StringBuilder ( ) ; Iterator < Pair > it = xy . iterator ( ) ; while ( it . hasNext ( ) ) { Pair pair = it . next ( ) ; result . append ( prefix ) . append ( Op . str ( pair . getX ( ) ) ) . append ( innerSeparator ) . append ( Op . str ( pair . getY ( ) ) ) . append ( suffix ) ; if ( it . hasNext ( ) ) { result . append ( outerSeparator ) ; } } return result . toString ( ) ; }
Formats a vector of Pair into a string in the form