Package org.apache.solr.common.params

# Class MultiMapSolrParams

java.lang.Object
org.apache.solr.common.params.SolrParams
org.apache.solr.common.params.MultiMapSolrParams

All Implemented Interfaces:
  `Serializable`, `Iterable<Map.Entry<String,String[]>>`, `MapSerializable`, `MapWriter`, `NavigableObject`, `org.noggit.JSONWriter.Writable`

public class MultiMapSolrParams 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 final Map<String,String[]>`
`map`

### Fields inherited from interface org.apache.solr.common.MapWriter

`EMPTY`

## Constructor Summary

Constructors
Constructor
Description
`MultiMapSolrParams(Map<String,String[]> map)`

## Method Summary

Modifier and Type
Method
Description
`static void`
`addParam(String name, String[] vals, Map<String,String[]> map)`
`static void`
`addParam(String name, String val, Map<String,String[]> map)`
`static Map<String,String[]>`
`asMultiMap(SolrParams params)`
Returns a MultiMap view of the SolrParams as efficiently as possible.
`static Map<String,String[]>`
`asMultiMap(SolrParams params, boolean newCopy)`
Returns a MultiMap view of the SolrParams.
`String`
`get(String name)`
Returns the first String value of a param, or null if not set.
`Map<String,String[]>`
`getMap()`
`Iterator<String>`
`getParameterNamesIterator()`
Returns an Iterator over the parameter names.
`String[]`
`getParams(String name)`
returns an array of the String values of a param, or null if no mapping for the param exists.
`Iterator<Map.Entry<String,String[]>>`
`iterator()`
Returns an Iterator of `Map.Entry` providing a multi-map view.

### Methods inherited from class org.apache.solr.common.params.SolrParams

`equals, fpname, get, 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, hashCode, of, of, required, stream, toLocalParamsString, toNamedList, toQueryString, toString, wrapAppended, wrapDefaults, writeMap`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface org.apache.solr.common.MapWriter

`jsonStr, toMap, write`

### Methods inherited from interface org.apache.solr.common.NavigableObject

`_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size`

## Field Details

### map

protected final Map<String,String[]> map

## Constructor Details

### MultiMapSolrParams

public MultiMapSolrParams(Map<String,String[]> map)

## Method Details

### addParam

public static void addParam(String name, String val, Map<String,String[]> map)

### addParam

public static void addParam(String name, String[] vals, Map<String,String[]> map)

### get

public String get(String name)
Description copied from class: `SolrParams`
Returns the first String value of a param, or null if not set. To get all, call `SolrParams.getParams(String)` instead.

Specified by:
  `get` in class `SolrParams`

### getParams

public String[] getParams(String name)
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 class `SolrParams`

### 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 implements `Iterable`.

Specified by:
  `getParameterNamesIterator` in class `SolrParams`

### iterator

public Iterator<Map.Entry<String,String[]>> iterator()
Description copied from class: `SolrParams`
Returns an Iterator of `Map.Entry` providing a multi-map view. Treat it as read-only.

Specified by:
  `iterator` in interface `Iterable<Map.Entry<String,String[]>>`
Overrides:
  `iterator` in class `SolrParams`

### getMap

public Map<String,String[]> getMap()

### asMultiMap

public static Map<String,String[]> asMultiMap(SolrParams params)
Returns a MultiMap view of the SolrParams as efficiently as possible. The returned map may or may not be a backing implementation.

### asMultiMap

public static Map<String,String[]> asMultiMap(SolrParams params, boolean newCopy)
Returns a MultiMap view of the SolrParams. A new map will be created if newCopy==true