Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.util.attributes
Class AttributeSet

java.lang.Object
  extended by org.openquark.util.attributes.AttributeSet

public final class AttributeSet
extends Object

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

AttributeSet

public AttributeSet()
AttributeSet constructor.


AttributeSet

public AttributeSet(boolean caseInsensitive)
AttributeSet constructor.


AttributeSet

public AttributeSet(AttributeSet other)
AttributeSet constructor.

Parameters:
other - another attribute set

AttributeSet

public AttributeSet(List<Attribute> attributes)
AttributeSet constructor.

Parameters:
attributes - a collection of attributes.
Method Detail

toString

public String toString()
Overrides:
toString in class Object
Returns:
a string representation to assist in debugging
See Also:
Object.toString()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
Object.hashCode()

isEmpty

public boolean isEmpty()
Returns True if there are no attributes in the set.

Returns:
True if there are no attributes in the set

clear

public void clear()
Removes all attributes from this set.


containsAttribute

public boolean containsAttribute(String attributeName)
Returns whether an attribute with the specified name exists in the set. Note that the name lookup is not case sensitive.

Parameters:
attributeName - the attribute name
Returns:
True if an attribute with the specified name exists in the set

getAttribute

public Attribute getAttribute(String attributeName)
Returns the attribute with the specified name, or null if none exists. Note that the name lookup is not case sensitive.

Parameters:
attributeName - the attribute name
Returns:
the attribute with the specified name, or null if none exists

getAllAttributes

public Collection<Attribute> getAllAttributes()
Returns a collection of all the attributes in the set.

Returns:
a collection of all the attributes in the set

getAllAttributeNames

public Collection<String> getAllAttributeNames()
Returns a collection of all the keys found in the set.

Returns:
Collection

setAttribute

public void setAttribute(Attribute newAttr)
Set the specified attribute in the set. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
newAttr - the new attribute value

appendListAttribute

public void appendListAttribute(Attribute newAttr)
Appends the specified value(s) to the list of values for the specified attribute. If it is not possible to append the value, then the attribute value will be replaced by the specified attribute.

Parameters:
newAttr - the attribute value(s) to append

setAttributes

public void setAttributes(AttributeSet attrSet)
Sets the specified attributes.

Parameters:
attrSet - another set of attributes

setAttributes

public void setAttributes(Collection<Attribute> attrs)
Sets the specified attributes

Parameters:
attrs - a collection of attributes to be added

removeAttribute

public void removeAttribute(String attributeName)
Removes the specified attribute from the set.

Parameters:
attributeName - the name of the attribute to remove

getAttributeSingleValue

public Object getAttributeSingleValue(String attributeName)
Returns a single value for the attribute, or null if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the value for the attribute, or null if none exists

getAttributeValues

public List<?> getAttributeValues(String attributeName)
Returns the values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getColourAttributeValue

public Color getColourAttributeValue(AttributeDescription attrDesc)
Returns the value of the colour attribute with the specified name. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the colour value of the attribute, or the default value from the attribute description

getColourAttributeValue

public Color getColourAttributeValue(String attrName,
                                     Color defaultValue)
Returns the value of the colour attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the colour value of the attribute, or the default value if none is found

getIntegerAttributeValue

public int getIntegerAttributeValue(AttributeDescription attrDesc)
Returns the value of the specified integer attribute. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the integer value of the attribute, or the default value from the attribute description

getIntegerAttributeValue

public int getIntegerAttributeValue(String attrName,
                                    int defaultValue)
Returns the value of the integer attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the integer value of the attribute, or the default value if none is found

getDoubleAttributeValue

public double getDoubleAttributeValue(AttributeDescription attrDesc)
Returns the value of the specified double attribute. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the double value of the attribute, or the default value from the attribute description

getDoubleAttributeValue

public double getDoubleAttributeValue(String attrName,
                                      double defaultValue)
Returns the value of the double attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the double value of the attribute, or the default value if none is found

getBooleanAttributeValue

public boolean getBooleanAttributeValue(AttributeDescription attrDesc)
Returns the value of the specified boolean attribute. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the boolean value of the attribute, or the default value from the attribute description

getBooleanAttributeValue

public boolean getBooleanAttributeValue(String attrName,
                                        boolean defaultValue)
Returns the value of the boolean attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the boolean value of the attribute, or the default value if none is found

getStringAttributeValue

public String getStringAttributeValue(AttributeDescription attrDesc)
Returns the value of the string attribute with the specified name. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the string value of the attribute, or the default value from the attribute description

getStringAttributeValue

public String getStringAttributeValue(String attrName,
                                      String defaultValue)
Returns the value of the string attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the string value of the attribute, or the default value if none is found

getTimeAttributeValue

public Time getTimeAttributeValue(AttributeDescription attrDesc)
Returns the value of the time attribute with the specified name. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the time value of the attribute, or the default value if none is found

getTimeAttributeValue

public Time getTimeAttributeValue(String attrName,
                                  Time defaultValue)
Returns the value of the time attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the time value of the attribute, or the default value if none is found

getAttributeSetValue

public AttributeSet getAttributeSetValue(AttributeDescription attrDesc)
Returns the value of the attribute set attribute with the specified name. The name and default value from the attribute description will be used. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrDesc - the attribute description
Returns:
the attribute set value of the attribute, or the default value if none is found

getAttributeSetValue

public AttributeSet getAttributeSetValue(String attrName,
                                         AttributeSet defaultValue)
Returns the value of the attribute set attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
defaultValue - the default value to return if there is no attribute value
Returns:
the attribute set value of the attribute, or the default value if none is found

getAttributeSetValue

public AttributeSet getAttributeSetValue(String attrName)
Returns the value of the attribute set attribute with the specified name. If there are multiple values for this attribute, the last one applied will be returned. If a matching property is not found, then the defaultValue is returned.

Parameters:
attrName - the name of the attribute
Returns:
the attribute set value of the attribute, or ab empty attribute set if none is found

getColourAttributeValues

public List<Color> getColourAttributeValues(String attributeName)
Returns the colour values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getBooleanAttributeValues

public List<Boolean> getBooleanAttributeValues(String attributeName)
Returns the boolean values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getIntegerAttributeValues

public List<Integer> getIntegerAttributeValues(String attributeName)
Returns the int values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getDoubleAttributeValues

public List<Double> getDoubleAttributeValues(String attributeName)
Returns the double values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getStringAttributeValues

public List<String> getStringAttributeValues(String attributeName)
Returns the string values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getTimeAttributeValues

public List<Time> getTimeAttributeValues(String attributeName)
Returns the time values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

getAttributeSetValues

public List<AttributeSet> getAttributeSetValues(String attributeName)
Returns the attribute set values for the attribute, or an empty list if none exists.

Parameters:
attributeName - the name of the attribute for which the value should be fetched
Returns:
the values for the attribute, or an empty list if none exists

setAttribute

public void setAttribute(String attrName,
                         int intVal)
Sets the value of an attribute to an integer value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
intVal - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         boolean boolVal)
Sets the value of an attribute to a boolean value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
boolVal - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         Color colorVal)
Sets the value of an attribute to a color value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
colorVal - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         double dblVal)
Sets the value of an attribute to a double value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
dblVal - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         String strVal)
Sets the value of an attribute to a string value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
strVal - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         Time timeVal)
Sets the value of an attribute to a time value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
timeVal - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         AttributeSet attrSet)
Sets the value of an attribute to an attribute set value. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
attrSet - the new attribute value

setAttribute

public void setAttribute(String attrName,
                         List<?> attrValues)
Sets the value of an attribute to a list of values. If an attribute with this name already exists in the set, then the new attribute will replace it.

Parameters:
attrName - the attribute name
attrValues - the new attribute values

appendListAttribute

public void appendListAttribute(String attrName,
                                int intVal)
Appends an integer value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
intVal - the attribute value to append

appendListAttribute

public void appendListAttribute(String attrName,
                                boolean boolVal)
Appends a boolean value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
boolVal - the attribute value to append

appendListAttribute

public void appendListAttribute(String attrName,
                                Color colorVal)
Appends a color value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
colorVal - the attribute value to append

appendListAttribute

public void appendListAttribute(String attrName,
                                double dblVal)
Appends a double value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
dblVal - the attribute value to append

appendListAttribute

public void appendListAttribute(String attrName,
                                String strVal)
Appends a string value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
strVal - the attribute value to append

appendListAttribute

public void appendListAttribute(String attrName,
                                Time timeVal)
Appends a time value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
timeVal - the attribute value to append

appendListAttribute

public void appendListAttribute(String attrName,
                                AttributeSet attrSet)
Appends an attribute set value to the list of values for the attribute. If the value cannot be appended, then the new value will replace the attribute value.

Parameters:
attrName - the attribute name
attrSet - the attribute value to append

getDifferingAttributeNames

public 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.

Parameters:
attrSet1 - one attribute set
attrSet2 - another attribute set
Returns:
the set of attribute names which are different.

Load

public static AttributeSet Load(Element attributesElem)
Loads the attribute set from the specified XML element.

Parameters:
attributesElem - the root XML element for the attribute set data
Returns:
a new attribute set

store

public void store(Element attributesElem)
Stores the attribute set into the specified XML element.

Parameters:
attributesElem - the XML element into which the attribute set will be saved

getAttributesAsList

public List<Attribute> getAttributesAsList()
Returns a list containing all the attributes from the set.

Returns:
a list containing all the attributes from the set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       Color value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       int value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       double value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       boolean value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       String value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       Time value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       AttributeSet value)
Creates a copy of the attribute set and sets the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute value to set
Returns:
a copy of the attribute set with the new attribute set

setAttributeInCopy

public AttributeSet setAttributeInCopy(String attrName,
                                       List<?> value)
Creates a copy of the attribute set and sets the specified attribute values in the copy.

Parameters:
attrName - the name of the attribute to set
value - the attribute values to set
Returns:
a copy of the attribute set with the new attribute values set

setAttributesInCopy

public AttributeSet setAttributesInCopy(List<Attribute> attributes)
Creates a copy of the attribute set and sets the specified attributes.

Parameters:
attributes - the attributes to set
Returns:
a copy of the attribute set with the new attributes set

setAttributesInCopy

public AttributeSet setAttributesInCopy(AttributeSet attributes)
Creates a copy of the attribute set and sets the specified attributes.

Parameters:
attributes - the attributes to set
Returns:
a copy of the attribute set with the new attributes set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          Color value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          int value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          double value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          boolean value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          String value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          Time value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          AttributeSet value)
Creates a copy of the attribute set and appends the specified attribute in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute value to append
Returns:
a copy of the attribute set with the new attribute set

appendAttributeInCopy

public AttributeSet appendAttributeInCopy(String attrName,
                                          List<?> value)
Creates a copy of the attribute set and appends the specified attributes in the copy.

Parameters:
attrName - the name of the attribute to append
value - the attribute values to append
Returns:
a copy of the attribute set with the new attribute values set

removeAttributeInCopy

public AttributeSet removeAttributeInCopy(String attrName)
Method removeAttributeInCopy

Parameters:
attrName -
Returns:
Returns a copy of this AttributeSet, minus the Attribute with the given name

removeMatchingAttributesInCopy

public AttributeSet removeMatchingAttributesInCopy(AttributeSet attrsToRemove)
Returns a copy of this attribute set, minus any attributes in the specified set with the same values.