public class Attributes extends LinkedHashMap<String,String>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Attributes() |
Modifier and Type | Method and Description |
---|---|
Attributes |
add(String key,
String value) |
Attributes |
add(String key,
String value,
boolean encode) |
Attributes |
addDefaultToEmpty(String attrName,
Object paramValue)
Add a key/value pair to the attributes, if the value is null, it will be set as an empty string.
|
Attributes |
addDefaultToEmpty(String attrName,
Object paramValue,
boolean encode)
Add a key/value pair to the attributes, if the value is null, it will be set as an empty string.
|
Attributes |
addIfExists(String attrName,
Object paramValue)
Add a key/value pair to the attributes only if the value is not null.
|
Attributes |
addIfExists(String attrName,
Object paramValue,
boolean encode)
Add a key/value pair to the attributes only if the value is not null.
|
Attributes |
addIfTrue(String attrName,
Object paramValue)
Add a key/value pair to the attributes only if the value is not null and is a boolean with a
value of 'true'.
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public Attributes add(String key, String value)
public Attributes add(String key, String value, boolean encode)
public Attributes addIfExists(String attrName, Object paramValue)
attrName
- attribute nameparamValue
- value of attributepublic Attributes addIfExists(String attrName, Object paramValue, boolean encode)
attrName
- attribute nameparamValue
- value of attributeencode
- html encode the valuepublic Attributes addIfTrue(String attrName, Object paramValue)
attrName
- attribute nameparamValue
- value of attributepublic Attributes addDefaultToEmpty(String attrName, Object paramValue)
attrName
- attribute nameparamValue
- value of attributepublic Attributes addDefaultToEmpty(String attrName, Object paramValue, boolean encode)
attrName
- attribute nameparamValue
- value of attributeencode
- html encode the valueCopyright © 2000–2020 Apache Software Foundation. All rights reserved.