Interface NamedValues
- All Known Implementing Classes:
MapNamedValues,QueryParameters
@Incubating
@SuppressJQAssistant(reason="We want to use the get/getOptional methods in this interface and there are some rules that prevents get*() methods on public types.")
public interface NamedValues
-
Method Summary
-
Method Details
-
get
- Type Parameters:
T- The expected type of the value.- Parameters:
name- The name of the value.paramType- The expected type of the parameter.- Returns:
- The value with the given name.
- Throws:
org.hibernate.search.util.common.SearchException- If there is no value with the given name.ClassCastException- If the value with the given name cannot be cast to the expected type.
-
getOptional
- Type Parameters:
T- The expected type of the value.- Parameters:
name- The name of the value.paramType- The expected type of the parameter.- Returns:
- An optional containing the value with the given name,
or
Optional.empty()if there is none. - Throws:
ClassCastException- If the value with the given name cannot be cast to the expected type.
-