Package org.apache.solr.common.params
Class DefaultSolrParams
- java.lang.Object
-
- org.apache.solr.common.params.SolrParams
-
- org.apache.solr.common.params.DefaultSolrParams
-
- All Implemented Interfaces:
Serializable
,Iterable<Map.Entry<String,String[]>>
,MapSerializable
,MapWriter
,NavigableObject
,org.noggit.JSONWriter.Writable
- Direct Known Subclasses:
AppendedSolrParams
public class DefaultSolrParams extends SolrParams
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected SolrParams
defaults
protected SolrParams
params
-
Constructor Summary
Constructors Constructor Description DefaultSolrParams(SolrParams params, SolrParams defaults)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
get(String param)
Returns the first String value of a param, or null 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 no mapping for the param exists.String
toString()
LikeSolrParams.toQueryString()
, but only replacing enough chars so that the URL may be unambiguously pasted back into a browser.-
Methods inherited from class org.apache.solr.common.params.SolrParams
fpname, get, getAll, getAll, getBool, getBool, getDouble, getDouble, getFieldBool, getFieldBool, getFieldDouble, getFieldDouble, getFieldFloat, getFieldFloat, getFieldInt, getFieldInt, getFieldParam, getFieldParam, getFieldParams, getFloat, getFloat, getInt, getInt, getLong, getLong, getPrimitiveBool, getPrimitiveFieldBool, getPrimitiveFieldFloat, getPrimitiveInt, iterator, required, stream, toFilteredSolrParams, toLocalParamsString, toMap, toMultiMap, toNamedList, toQueryString, toSolrParams, wrapAppended, wrapDefaults, writeMap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
-
-
-
-
Field Detail
-
params
protected final SolrParams params
-
defaults
protected final SolrParams defaults
-
-
Constructor Detail
-
DefaultSolrParams
public DefaultSolrParams(SolrParams params, SolrParams defaults)
-
-
Method Detail
-
get
public String get(String param)
Description copied from class:SolrParams
Returns the first String value of a param, or null if not set. To get all, callSolrParams.getParams(String)
instead.- Specified by:
get
in classSolrParams
-
getParams
public String[] getParams(String param)
Description copied from class:SolrParams
returns an array of the String values of a param, or null if no mapping for the param exists.- Specified by:
getParams
in classSolrParams
-
getParameterNamesIterator
public Iterator<String> getParameterNamesIterator()
Description copied from class:SolrParams
Returns an Iterator over the parameter names. If you were to call a getter for this parameter, you should get a non-null value. Since you probably want the value, consider using Java 5 for-each style instead for convenience since a SolrParams implementsIterable
.- Specified by:
getParameterNamesIterator
in classSolrParams
-
toString
public String toString()
Description copied from class:SolrParams
LikeSolrParams.toQueryString()
, but only replacing enough chars so that the URL may be unambiguously pasted back into a browser. This method can be used to properly log query parameters without making them unreadable.Characters with a numeric value less than 32 are encoded. &,=,%,+,space are encoded.
- Overrides:
toString
in classSolrParams
-
-