|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openquark.util.attributes.AttributeSet
public final class AttributeSet
A collection of attributes which can be accessed by name.
| Constructor Summary | |
|---|---|
AttributeSet()
AttributeSet constructor. |
|
AttributeSet(AttributeSet other)
AttributeSet constructor. |
|
AttributeSet(boolean caseInsensitive)
AttributeSet constructor. |
|
AttributeSet(List<Attribute> attributes)
AttributeSet constructor. |
|
| Method Summary | |
|---|---|
AttributeSet |
appendAttributeInCopy(String attrName,
AttributeSet value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
boolean value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
Color value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
double value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
int value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
List<?> value)
Creates a copy of the attribute set and appends the specified attributes in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
String value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
AttributeSet |
appendAttributeInCopy(String attrName,
Time value)
Creates a copy of the attribute set and appends the specified attribute in the copy. |
void |
appendListAttribute(Attribute newAttr)
Appends the specified value(s) to the list of values for the specified attribute. |
void |
appendListAttribute(String attrName,
AttributeSet attrSet)
Appends an attribute set value to the list of values for the attribute. |
void |
appendListAttribute(String attrName,
boolean boolVal)
Appends a boolean value to the list of values for the attribute. |
void |
appendListAttribute(String attrName,
Color colorVal)
Appends a color value to the list of values for the attribute. |
void |
appendListAttribute(String attrName,
double dblVal)
Appends a double value to the list of values for the attribute. |
void |
appendListAttribute(String attrName,
int intVal)
Appends an integer value to the list of values for the attribute. |
void |
appendListAttribute(String attrName,
String strVal)
Appends a string value to the list of values for the attribute. |
void |
appendListAttribute(String attrName,
Time timeVal)
Appends a time value to the list of values for the attribute. |
void |
clear()
Removes all attributes from this set. |
boolean |
containsAttribute(String attributeName)
Returns whether an attribute with the specified name exists in the set. |
boolean |
equals(Object obj)
|
Collection<String> |
getAllAttributeNames()
Returns a collection of all the keys found in the set. |
Collection<Attribute> |
getAllAttributes()
Returns a collection of all the attributes in the set. |
Attribute |
getAttribute(String attributeName)
Returns the attribute with the specified name, or null if none exists. |
List<Attribute> |
getAttributesAsList()
Returns a list containing all the attributes from the set. |
AttributeSet |
getAttributeSetValue(AttributeDescription attrDesc)
Returns the value of the attribute set attribute with the specified name. |
AttributeSet |
getAttributeSetValue(String attrName)
Returns the value of the attribute set attribute with the specified name. |
AttributeSet |
getAttributeSetValue(String attrName,
AttributeSet defaultValue)
Returns the value of the attribute set attribute with the specified name. |
List<AttributeSet> |
getAttributeSetValues(String attributeName)
Returns the attribute set values for the attribute, or an empty list if none exists. |
Object |
getAttributeSingleValue(String attributeName)
Returns a single value for the attribute, or null if none exists. |
List<?> |
getAttributeValues(String attributeName)
Returns the values for the attribute, or an empty list if none exists. |
boolean |
getBooleanAttributeValue(AttributeDescription attrDesc)
Returns the value of the specified boolean attribute. |
boolean |
getBooleanAttributeValue(String attrName,
boolean defaultValue)
Returns the value of the boolean attribute with the specified name. |
List<Boolean> |
getBooleanAttributeValues(String attributeName)
Returns the boolean values for the attribute, or an empty list if none exists. |
Color |
getColourAttributeValue(AttributeDescription attrDesc)
Returns the value of the colour attribute with the specified name. |
Color |
getColourAttributeValue(String attrName,
Color defaultValue)
Returns the value of the colour attribute with the specified name. |
List<Color> |
getColourAttributeValues(String attributeName)
Returns the colour values for the attribute, or an empty list if none exists. |
static Set<String> |
getDifferingAttributeNames(AttributeSet attrSet1,
AttributeSet attrSet2)
Compares the 2 attribute sets and returns the names of the attributes which are different or are only in one set. |
double |
getDoubleAttributeValue(AttributeDescription attrDesc)
Returns the value of the specified double attribute. |
double |
getDoubleAttributeValue(String attrName,
double defaultValue)
Returns the value of the double attribute with the specified name. |
List<Double> |
getDoubleAttributeValues(String attributeName)
Returns the double values for the attribute, or an empty list if none exists. |
int |
getIntegerAttributeValue(AttributeDescription attrDesc)
Returns the value of the specified integer attribute. |
int |
getIntegerAttributeValue(String attrName,
int defaultValue)
Returns the value of the integer attribute with the specified name. |
List<Integer> |
getIntegerAttributeValues(String attributeName)
Returns the int values for the attribute, or an empty list if none exists. |
String |
getStringAttributeValue(AttributeDescription attrDesc)
Returns the value of the string attribute with the specified name. |
String |
getStringAttributeValue(String attrName,
String defaultValue)
Returns the value of the string attribute with the specified name. |
List<String> |
getStringAttributeValues(String attributeName)
Returns the string values for the attribute, or an empty list if none exists. |
Time |
getTimeAttributeValue(AttributeDescription attrDesc)
Returns the value of the time attribute with the specified name. |
Time |
getTimeAttributeValue(String attrName,
Time defaultValue)
Returns the value of the time attribute with the specified name. |
List<Time> |
getTimeAttributeValues(String attributeName)
Returns the time values for the attribute, or an empty list if none exists. |
int |
hashCode()
|
boolean |
isEmpty()
Returns True if there are no attributes in the set. |
static AttributeSet |
Load(Element attributesElem)
Loads the attribute set from the specified XML element. |
void |
removeAttribute(String attributeName)
Removes the specified attribute from the set. |
AttributeSet |
removeAttributeInCopy(String attrName)
Method removeAttributeInCopy |
AttributeSet |
removeMatchingAttributesInCopy(AttributeSet attrsToRemove)
Returns a copy of this attribute set, minus any attributes in the specified set with the same values. |
void |
setAttribute(Attribute newAttr)
Set the specified attribute in the set. |
void |
setAttribute(String attrName,
AttributeSet attrSet)
Sets the value of an attribute to an attribute set value. |
void |
setAttribute(String attrName,
boolean boolVal)
Sets the value of an attribute to a boolean value. |
void |
setAttribute(String attrName,
Color colorVal)
Sets the value of an attribute to a color value. |
void |
setAttribute(String attrName,
double dblVal)
Sets the value of an attribute to a double value. |
void |
setAttribute(String attrName,
int intVal)
Sets the value of an attribute to an integer value. |
void |
setAttribute(String attrName,
List<?> attrValues)
Sets the value of an attribute to a list of values. |
void |
setAttribute(String attrName,
String strVal)
Sets the value of an attribute to a string value. |
void |
setAttribute(String attrName,
Time timeVal)
Sets the value of an attribute to a time value. |
AttributeSet |
setAttributeInCopy(String attrName,
AttributeSet value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
boolean value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
Color value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
double value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
int value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
List<?> value)
Creates a copy of the attribute set and sets the specified attribute values in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
String value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
AttributeSet |
setAttributeInCopy(String attrName,
Time value)
Creates a copy of the attribute set and sets the specified attribute in the copy. |
void |
setAttributes(AttributeSet attrSet)
Sets the specified attributes. |
void |
setAttributes(Collection<Attribute> attrs)
Sets the specified attributes |
AttributeSet |
setAttributesInCopy(AttributeSet attributes)
Creates a copy of the attribute set and sets the specified attributes. |
AttributeSet |
setAttributesInCopy(List<Attribute> attributes)
Creates a copy of the attribute set and sets the specified attributes. |
void |
store(Element attributesElem)
Stores the attribute set into the specified XML element. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeSet()
public AttributeSet(boolean caseInsensitive)
public AttributeSet(AttributeSet other)
other - another attribute setpublic AttributeSet(List<Attribute> attributes)
attributes - a collection of attributes.| Method Detail |
|---|
public String toString()
toString in class ObjectObject.toString()public boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean isEmpty()
public void clear()
public boolean containsAttribute(String attributeName)
attributeName - the attribute name
public Attribute getAttribute(String attributeName)
attributeName - the attribute name
public Collection<Attribute> getAllAttributes()
public Collection<String> getAllAttributeNames()
public void setAttribute(Attribute newAttr)
newAttr - the new attribute valuepublic void appendListAttribute(Attribute newAttr)
newAttr - the attribute value(s) to appendpublic void setAttributes(AttributeSet attrSet)
attrSet - another set of attributespublic void setAttributes(Collection<Attribute> attrs)
attrs - a collection of attributes to be addedpublic void removeAttribute(String attributeName)
attributeName - the name of the attribute to removepublic Object getAttributeSingleValue(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<?> getAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public Color getColourAttributeValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public Color getColourAttributeValue(String attrName,
Color defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public int getIntegerAttributeValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public int getIntegerAttributeValue(String attrName,
int defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public double getDoubleAttributeValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public double getDoubleAttributeValue(String attrName,
double defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public boolean getBooleanAttributeValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public boolean getBooleanAttributeValue(String attrName,
boolean defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public String getStringAttributeValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public String getStringAttributeValue(String attrName,
String defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public Time getTimeAttributeValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public Time getTimeAttributeValue(String attrName,
Time defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public AttributeSet getAttributeSetValue(AttributeDescription attrDesc)
attrDesc - the attribute description
public AttributeSet getAttributeSetValue(String attrName,
AttributeSet defaultValue)
attrName - the name of the attributedefaultValue - the default value to return if there is no attribute value
public AttributeSet getAttributeSetValue(String attrName)
attrName - the name of the attribute
public List<Color> getColourAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<Boolean> getBooleanAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<Integer> getIntegerAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<Double> getDoubleAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<String> getStringAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<Time> getTimeAttributeValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public List<AttributeSet> getAttributeSetValues(String attributeName)
attributeName - the name of the attribute for which the value should be fetched
public void setAttribute(String attrName,
int intVal)
attrName - the attribute nameintVal - the new attribute value
public void setAttribute(String attrName,
boolean boolVal)
attrName - the attribute nameboolVal - the new attribute value
public void setAttribute(String attrName,
Color colorVal)
attrName - the attribute namecolorVal - the new attribute value
public void setAttribute(String attrName,
double dblVal)
attrName - the attribute namedblVal - the new attribute value
public void setAttribute(String attrName,
String strVal)
attrName - the attribute namestrVal - the new attribute value
public void setAttribute(String attrName,
Time timeVal)
attrName - the attribute nametimeVal - the new attribute value
public void setAttribute(String attrName,
AttributeSet attrSet)
attrName - the attribute nameattrSet - the new attribute value
public void setAttribute(String attrName,
List<?> attrValues)
attrName - the attribute nameattrValues - the new attribute values
public void appendListAttribute(String attrName,
int intVal)
attrName - the attribute nameintVal - the attribute value to append
public void appendListAttribute(String attrName,
boolean boolVal)
attrName - the attribute nameboolVal - the attribute value to append
public void appendListAttribute(String attrName,
Color colorVal)
attrName - the attribute namecolorVal - the attribute value to append
public void appendListAttribute(String attrName,
double dblVal)
attrName - the attribute namedblVal - the attribute value to append
public void appendListAttribute(String attrName,
String strVal)
attrName - the attribute namestrVal - the attribute value to append
public void appendListAttribute(String attrName,
Time timeVal)
attrName - the attribute nametimeVal - the attribute value to append
public void appendListAttribute(String attrName,
AttributeSet attrSet)
attrName - the attribute nameattrSet - the attribute value to append
public static Set<String> getDifferingAttributeNames(AttributeSet attrSet1,
AttributeSet attrSet2)
attrSet1 - one attribute setattrSet2 - another attribute set
public static AttributeSet Load(Element attributesElem)
attributesElem - the root XML element for the attribute set data
public void store(Element attributesElem)
attributesElem - the XML element into which the attribute set will be savedpublic List<Attribute> getAttributesAsList()
public AttributeSet setAttributeInCopy(String attrName,
Color value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
int value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
double value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
boolean value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
String value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
Time value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
AttributeSet value)
attrName - the name of the attribute to setvalue - the attribute value to set
public AttributeSet setAttributeInCopy(String attrName,
List<?> value)
attrName - the name of the attribute to setvalue - the attribute values to set
public AttributeSet setAttributesInCopy(List<Attribute> attributes)
attributes - the attributes to set
public AttributeSet setAttributesInCopy(AttributeSet attributes)
attributes - the attributes to set
public AttributeSet appendAttributeInCopy(String attrName,
Color value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
int value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
double value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
boolean value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
String value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
Time value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
AttributeSet value)
attrName - the name of the attribute to appendvalue - the attribute value to append
public AttributeSet appendAttributeInCopy(String attrName,
List<?> value)
attrName - the name of the attribute to appendvalue - the attribute values to append
public AttributeSet removeAttributeInCopy(String attrName)
attrName -
public AttributeSet removeMatchingAttributesInCopy(AttributeSet attrsToRemove)
| ||||||