public class Attributes extends Object
| Constructor and Description |
|---|
Attributes(Properties attributes)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(String key)
Gets the attribute by name
|
String |
getAttribute(String key,
String defaultValue)
Gets the attribute by name
|
Collection<String> |
getAvaliableAttributes()
Gets names of all attributes
|
boolean |
hasAttribute(String key)
Determines whether attribute with given name is defined
|
static Properties |
parseStyle(String style)
Parses the style into list of key - value pairs
|
String |
toString() |
public Attributes(Properties attributes)
attributes - list of key - value pairspublic String getAttribute(String key)
key - name of the attribute to getpublic String getAttribute(String key, String defaultValue)
key - name of the attribute to getdefaultValue - default value to use if attribute is not definedpublic boolean hasAttribute(String key)
key - name of the attributepublic Collection<String> getAvaliableAttributes()
public static Properties parseStyle(String style)
style - String representation of styleCopyright © 2012. All Rights Reserved.