question: public static FormatDefinition fromString ( String string ) { FormatDefinition formatDefinition = new FormatDefinition ( ) ; String [ ] tokens = string . split ( " " ) ; for ( String word : tokens ) { int pos = word . indexOf ( ":" ) ; formatDefinition . addItem ( word . substring ( 0 , pos ) , Type . valueOf ( word . substring ( pos + 1 ) ) ) ; } return formatDefinition ; }
target:  create a format definition from a defining string