question: public static String joinGt ( boolean phased , int ... gt ) { final char sep = phased ? PHASED_SEPARATOR : UNPHASED_SEPARATOR ; switch ( gt . length ) { case 0 : return MISSING_FIELD ; case 1 : return encodeId ( gt [ 0 ] ) ; case 2 : return encodeId ( gt [ 0 ] ) + sep + encodeId ( gt [ 1 ] ) ; default : final StringBuilder sb = new StringBuilder ( ) ; for ( final int c : gt ) { if ( sb . length ( ) > 0 ) { sb . append ( sep ) ; } sb . append ( encodeId ( c ) ) ; } return sb . toString ( ) ; } }
target:  Utility method for creating a VCF genotype subfield from an array of numeric allele identifiers.