public ArrayList < GoodwillSchemaField > getSchema ( ) { final ArrayList < GoodwillSchemaField > items = new ArrayList < GoodwillSchemaField > ( thriftItems . values ( ) ) ; Collections . sort ( items , new Comparator < GoodwillSchemaField > ( ) { @ Override public int compare ( final GoodwillSchemaField left , final GoodwillSchemaField right ) { return Short . valueOf ( left . getId ( ) ) . compareTo ( right . getId ( ) ) ; } } ) ; return items ; }
Get the schema as a collection of fields . We guarantee the ordering by field id .