Package org.apache.solr.common
Class LinkedHashMapWriter<V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,V>
-
- org.apache.solr.common.LinkedHashMapWriter<V>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,V>
,MapSerializable
,MapWriter
,NavigableObject
public class LinkedHashMapWriter<V> extends LinkedHashMap<String,V> implements MapWriter
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Constructor Summary
Constructors Constructor Description LinkedHashMapWriter()
LinkedHashMapWriter(int initialCapacity)
LinkedHashMapWriter(Map<? extends String,? extends V> m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
_get(String path, Object def)
Get a child object value using json path.Object
_get(List<String> path, Object def)
Get a child object value using json pathString
toString()
void
writeMap(MapWriter.EntryWriter ew)
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _getStr, _getStr, _size
-
-
-
-
Method Detail
-
writeMap
public void writeMap(MapWriter.EntryWriter ew) throws IOException
- Specified by:
writeMap
in interfaceMapWriter
- Throws:
IOException
-
_get
public Object _get(String path, Object def)
Description copied from interface:NavigableObject
Get a child object value using json path. This usually ends up in String split operations use a list of strings where performance is important- Specified by:
_get
in interfaceNavigableObject
- Parameters:
path
- the full path to that object such as a/b/c[4]/d etcdef
- the default- Returns:
- the found value or default
-
_get
public Object _get(List<String> path, Object def)
Description copied from interface:NavigableObject
Get a child object value using json path- Specified by:
_get
in interfaceNavigableObject
- Parameters:
path
- the full path to that object such as ["a","b","c[4]","d"] etcdef
- the default- Returns:
- the found value or default
-
toString
public String toString()
- Overrides:
toString
in classAbstractMap<String,V>
-
-