public class AttributeMap extends HashMap<String,AttributeValue>
AttributeValue
. The class extends HashMap
and should be treated as such.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
AttributeMap()
Create an empty AttributeMap
|
AttributeMap(Map<String,AttributeValue> attributes)
Create an AttributeMap based on the specified map
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
getMaskedAttributeNames()
Gets the names of the attributes in this map that are flagged as masked.
|
boolean |
getMaskOgnlValues()
Gets whether the OGNL values should be masked.
|
String |
getSingleValue(String name)
Gets the value associated with the specified attribute name.
|
String |
getSingleValue(String name,
boolean enforceMasking)
Gets the real or masked value associated with the specified attribute name.
|
AttributeValue |
put(String key,
AttributeValue value)
Adds the
AttributeValue to this map. |
void |
put(String key,
String value)
Adds a key value pair to this map.
|
void |
putAll(Map<? extends String,? extends AttributeValue> m)
Copies all of the mappings from the specified map to this map.
|
void |
putIfNotPresent(String key,
AttributeValue value)
Puts the key/value entry if the key doesn't already exist in this map.
|
void |
setMaskOgnlValues(boolean maskOgnlValues)
Sets whether the OGNL values should be masked.
|
String |
toString() |
static String |
toString(Map<String,AttributeValue> map)
Static method to stringify the specified map.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode
public AttributeMap(Map<String,AttributeValue> attributes)
attributes
- A map containing the attributes to addpublic AttributeMap()
public void put(String key, String value)
AttributeValue
and added with
put(String, AttributeValue)
.key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.public void putAll(Map<? extends String,? extends AttributeValue> m)
putAll
in interface Map<String,AttributeValue>
putAll
in class HashMap<String,AttributeValue>
m
- mappings to be stored in this mapNullPointerException
- if the specified map is nullpublic AttributeValue put(String key, AttributeValue value)
AttributeValue
to this map. The entry is not added if the value is null.put
in interface Map<String,AttributeValue>
put
in class HashMap<String,AttributeValue>
key
- Key with which the specified value is to be associated.value
- Value to be associated with the specified key.public void putIfNotPresent(String key, AttributeValue value)
key
- The key to put if it doesn't already exist in the map.value
- The value to put if the key doesn't already exist in the map.public static String toString(Map<String,AttributeValue> map)
map
- The map to convert to a String.public String toString()
toString
in class AbstractMap<String,AttributeValue>
public Set<String> getMaskedAttributeNames()
public String getSingleValue(String name)
name
- The name of the attribute to look up.public String getSingleValue(String name, boolean enforceMasking)
name
- The name of the attribute to lookup.enforceMasking
- Whether the returned value should be masked if the attribute is flagged for masking.public boolean getMaskOgnlValues()
public void setMaskOgnlValues(boolean maskOgnlValues)
maskOgnlValues
- Whether the OGNL values should be masked.Copyright 2019 Ping Identity Corp. All rights reserved.