public class RequiredSolrParams extends SolrParams
RequiredSolrParams
will return a valid non-null value or throw a 400 exception.
(If you pass in null
as the default value, you can
get a null return value)Modifier and Type | Field and Description |
---|---|
protected SolrParams |
params |
Constructor and Description |
---|
RequiredSolrParams(SolrParams params) |
Modifier and Type | Method and Description |
---|---|
void |
check(String... params) |
String |
get(String param)
get the param from params, fail if not found
|
String |
get(String param,
String def)
returns the value of the param, or def if not set
|
boolean |
getBool(String param,
boolean def)
Returns the boolean value of the param, or def if not set
|
boolean |
getFieldBool(String field,
String param,
boolean def)
Returns the boolean value of the field param,
or the value for param, or def if neither is set.
|
float |
getFieldFloat(String field,
String param,
float def)
Returns the float value of the field param,
or the value for param, or def if neither is set.
|
int |
getFieldInt(String field,
String param,
int def)
Returns the int value of the field param,
or the value for param, or def if neither is set.
|
String |
getFieldParam(String field,
String param)
returns the String value of the field parameter, "f.field.param", or
the value for "param" if that is not set.
|
String |
getFieldParam(String field,
String param,
String def)
returns the String value of the field parameter, "f.field.param", or
the value for "param" if that is not set.
|
String[] |
getFieldParams(String field,
String param)
returns the String values of the field parameter, "f.field.param", or
the values for "param" if that is not set.
|
float |
getFloat(String param,
float def)
Returns the float value of the param, or def if not set
|
int |
getInt(String param,
int def)
Returns the int value of the param, or def if not set
|
Iterator<String> |
getParameterNamesIterator()
returns an Iterator over the parameter names
|
String[] |
getParams(String param)
returns an array of the String values of a param, or null if none
|
String |
toString() |
fpname, getAll, getBool, getDouble, getDouble, getFieldBool, getFieldDouble, getFieldDouble, getFieldFloat, getFieldInt, getFloat, getInt, getLong, getLong, getLong, required, toFilteredSolrParams, toMap, toMultiMap, toNamedList, toSolrParams, wrapAppended, wrapDefaults
protected final SolrParams params
public RequiredSolrParams(SolrParams params)
public String get(String param)
get
in class SolrParams
public String getFieldParam(String field, String param)
SolrParams
getFieldParam
in class SolrParams
public String[] getFieldParams(String field, String param)
SolrParams
getFieldParams
in class SolrParams
public String[] getParams(String param)
SolrParams
getParams
in class SolrParams
public Iterator<String> getParameterNamesIterator()
getParameterNamesIterator
in class SolrParams
public String get(String param, String def)
SolrParams
get
in class SolrParams
public int getInt(String param, int def)
SolrParams
getInt
in class SolrParams
public float getFloat(String param, float def)
SolrParams
getFloat
in class SolrParams
public boolean getBool(String param, boolean def)
SolrParams
getBool
in class SolrParams
public int getFieldInt(String field, String param, int def)
SolrParams
getFieldInt
in class SolrParams
public boolean getFieldBool(String field, String param, boolean def)
SolrParams
getFieldBool
in class SolrParams
public float getFieldFloat(String field, String param, float def)
SolrParams
getFieldFloat
in class SolrParams
public String getFieldParam(String field, String param, String def)
SolrParams
getFieldParam
in class SolrParams
public void check(String... params)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.