Adds the specified attribute value to this attribute set if it is not
already present, first removing any existing value in the same
attribute category as the specified attribute value (optional
operation).
Adds the specified attribute value to this attribute set if it is not
already present, first removing any existing value in the same
attribute category as the specified attribute value (optional
operation).
Returns:
true if this attribute set changed as a result of
the call, i.e., the given attribute value was not already a
member of this attribute set.
Parameters:
-
attribute - Attribute value to be added to this attribute set.
Throws:
-
UnmodifiableSetException - (unchecked exception) Thrown if this attribute set does not
support the
add()
operation.
-
ClassCastException - (unchecked exception) Thrown if the
attribute
is
not an instance of interface
{@link PrintRequestAttribute PrintRequestAttribute}.
-
NullPointerException - (unchecked exception) Thrown if the
attribute
is null.