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, get, removeEldestEntryclone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCode, toStringpublic 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–2019 Apache Software Foundation. All rights reserved.