List of usage examples for org.apache.solr.common.util NamedList findRecursive
public Object findRecursive(String... args)
From source file:com.s24.search.solr.util.NamedLists.java
License:Apache License
/** * Gets a nested element from the given list. See the class documentation for notes on convenience methods that take * a path as their argument./* w ww. java2 s. co m*/ * * @see #get(NamedList, Class, String) */ public static <T> T get(NamedList<?> namedList, Class<T> elementClass, String... names) { Object value = namedList != null ? namedList.findRecursive(names) : null; try { return elementClass.cast(value); } catch (ClassCastException e) { throw new NamedListEntryClassCastException(names, value.getClass(), elementClass); } }