public class Attributes extends Object
Modifier and Type | Class and Description |
---|---|
class |
Attributes.Entry |
Constructor and Description |
---|
Attributes() |
Attributes(Attributes source)
copy constructor.
|
Attributes(String... values) |
Attributes(org.xmlpull.v1.XmlPullParser xpp)
Get Attributes from XmlParser.
|
Modifier and Type | Method and Description |
---|---|
Properties |
createProperties()
Create Properties instance from attributes.
|
List<Attributes.Entry> |
extractParameters() |
String |
get(String name)
Return the attribute with the given name.
|
boolean |
getAsBoolean(String name,
boolean defaultValue)
Get as Boolean helper.
|
Color |
getAsColor(String name) |
Float |
getAsFloat(String name) |
Integer |
getAsInteger(String name) |
Integer |
getAsInteger(String name,
int defaultValue) |
Map<String,String> |
getAttributes() |
String |
getWithDefault(String name,
String defaultValue) |
String |
getWithTag(String name,
String tag) |
boolean |
isSet(String name)
Is the given attribute available.
|
void |
merge(Attributes src) |
void |
mergeAndTag(Attributes src,
String tag) |
void |
refreshFromAttributes(Attributes src) |
void |
remove(String key) |
void |
removeWithTag(String tag) |
void |
resolveParameters(Attributes attributes) |
void |
set(String name,
String value)
Set an attribute.
|
String |
toString() |
void |
translateSpecialValues(Map<String,ResourceBundle> resourceBundle,
ScreenController screenController,
Properties globalProperties) |
public Attributes()
public Attributes(String... values)
public Attributes(org.xmlpull.v1.XmlPullParser xpp)
xpp
- xpppublic Attributes(Attributes source)
source
- sourcepublic void translateSpecialValues(Map<String,ResourceBundle> resourceBundle, ScreenController screenController, Properties globalProperties)
public boolean isSet(String name)
name
- namepublic String get(String name)
name
- name of attibutepublic Properties createProperties()
public boolean getAsBoolean(String name, boolean defaultValue)
name
- name of attributedefaultValue
- default valuepublic void set(String name, String value)
name
- name of the attribute to setvalue
- value to set attribute topublic void merge(Attributes src)
public void mergeAndTag(Attributes src, String tag)
public void refreshFromAttributes(Attributes src)
public List<Attributes.Entry> extractParameters()
public void remove(String key)
public void resolveParameters(Attributes attributes)
public void removeWithTag(String tag)
Copyright © 2013. All Rights Reserved.