public < V > T getFirstByField ( IndexDefinition < T , V > indexDefinition , V value ) { FieldIndex < T , V > index = ( FieldIndex < T , V > ) mIndices . get ( indexDefinition ) ; if ( index == null ) { throw new IllegalStateException ( "the given index isn't defined for this IndexedSet" ) ; } return index . getFirst ( value ) ; }
Gets the object from the set of objects with the specified field value .