code: 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);
    }
docs: Gets the object from the set of objects with the specified field value.
  
  @param indexDefinition the field index definition
  @param value the field value
  @param <V> the field type
  @return the object or null if there is no such object