Class ResolvingMarshalledMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,Object>
org.apache.juneau.marshall.collections.MarshalledMap
org.apache.juneau.marshall.collections.ResolvingMarshalledMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
Subclass of a
MarshalledMap that automatically resolves any SVL variables in values.
Resolves variables in the following values:
- Values of type
CharSequence. - Arrays containing values of type
CharSequence. - Collections containing values of type
CharSequence. - Maps containing values of type
CharSequence.
All other data types are left as-is.
See Also:
- See Also:
-
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> -
Field Summary
Fields inherited from class org.apache.juneau.marshall.collections.MarshalledMap
EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an entry to this map.Appends all the entries in the specified map to this map.Add if flag istrue .booleanEnables filtering based on a predicate test.inthashCode()Set an inner map in this map to allow for chained get calls.The opposite ofMarshalledMap.removeAll(String...).Returns a modifiable copy of this map if it's unmodifiable.session(MarshallingSession session) Override the default bean session used for converting POJOs.setBeanSession(MarshallingSession value) Sets theMarshallingSessioncurrently associated with this map.Returns an unmodifiable copy of this map if it's modifiable.Methods inherited from class org.apache.juneau.marshall.collections.MarshalledMap
appendFirst, appendIf, appendIfAbsent, appendIfAbsentIf, at, bs, cast, cast, containsKey, containsKeyNotEmpty, containsOuterKey, create, deleteAt, entrySet, exclude, filtered, filteredMap, filteredMap, find, find, findBoolean, findInt, findKeyIgnoreCase, findList, findLong, findMap, findString, get, get, getAt, getAt, getBoolean, getBoolean, getClassMeta, getFirstKey, getInt, getInt, getList, getList, getList, getList, getLong, getLong, getMap, getMap, getMap, getMap, getMarshallingSession, getString, getString, getStringArray, getStringArray, getSwapped, getWithDefault, getWithDefault, getWithDefault, include, is, isUnmodifiable, keySet, newMarshalledMap, of, of, ofString, ofString, postAt, put, putAt, removeAll, removeAll, removeBoolean, removeBoolean, removeInt, removeInt, removeString, removeString, removeWithDefault, toStringMethods inherited from class java.util.LinkedHashMap
clear, containsValue, forEach, getOrDefault, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
ResolvingMarshalledMap
Constructor.- Parameters:
varResolver- The var resolver session to use for resolving SVL variables.
-
-
Method Details
-
equals
-
hashCode
-
append
Description copied from class:MarshalledMapAppends all the entries in the specified map to this map.- Overrides:
appendin classMarshalledMap- Parameters:
values- The map to copy. Can benull (no-op).- Returns:
- This object.
-
append
Description copied from class:MarshalledMapAdds an entry to this map.- Overrides:
appendin classMarshalledMap- Parameters:
key- The key.value- The value.- Returns:
- This object.
-
appendIf
Description copied from class:MarshalledMapAdd if flag istrue .- Overrides:
appendIfin classMarshalledMap- Parameters:
flag- The flag to check.key- The key.value- The value.- Returns:
- This object.
-
filtered
Description copied from class:MarshalledMapEnables filtering based on a predicate test.If the predicate evaluates to
false on values added to this map, the entry will be skipped.- Overrides:
filteredin classMarshalledMap- Parameters:
value- The value tester predicate.- Returns:
- This object.
-
get
-
inner
Description copied from class:MarshalledMapSet an inner map in this map to allow for chained get calls.If
MarshalledMap.get(Object)returnsnull , thenMarshalledMap.get(Object)will be called on the inner map.- Overrides:
innerin classMarshalledMap- Parameters:
inner- The inner map. Can benull to remove the inner map from an existing map.- Returns:
- This object.
-
keepAll
Description copied from class:MarshalledMapThe opposite ofMarshalledMap.removeAll(String...).Discards all keys from this map that aren't in the specified list.
- Overrides:
keepAllin classMarshalledMap- Parameters:
keys- The keys to keep.- Returns:
- This map.
-
modifiable
Description copied from class:MarshalledMapReturns a modifiable copy of this map if it's unmodifiable.- Overrides:
modifiablein classMarshalledMap- Returns:
- A modifiable copy of this map if it's unmodifiable, or this map if it is already modifiable.
-
session
Description copied from class:MarshalledMapOverride the default bean session used for converting POJOs.Default is
MarshallingContext.DEFAULT, which is sufficient in most cases.Useful if you're serializing/parsing beans with transforms defined.
- Overrides:
sessionin classMarshalledMap- Parameters:
session- The new bean session.- Returns:
- This object.
-
setBeanSession
Description copied from class:MarshalledMapSets theMarshallingSessioncurrently associated with this map.- Overrides:
setBeanSessionin classMarshalledMap- Parameters:
value- TheMarshallingSessioncurrently associated with this map.- Returns:
- This object.
-
unmodifiable
Description copied from class:MarshalledMapReturns an unmodifiable copy of this map if it's modifiable.- Overrides:
unmodifiablein classMarshalledMap- Returns:
- An unmodifiable copy of this map if it's modifiable, or this map if it is already unmodifiable.
-