DocAttributeSet specifies the interface for a set of doc
attributes, i.e. printing attributes that implement interface
DocAttribute. In the Print Service API, the client uses
a DocAttributeSet to specify the characteristics of an individual doc
and the print job settings to be applied to an individual doc.
A DocAttributeSet is just an AttributeSet whose
constructors and mutating operations guarantee an additional invariant,
namely that all attribute values in the DocAttributeSet must be
instances of interface DocAttribute. The
add(Attribute), and
addAll(AttributeSet) operations are respecified
below to guarantee this additional invariant.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | 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 setattribute value to be added to this attribute set attribute)Redeclares javax. 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). |
| public boolean | Returns: true if this attribute set changed as a result of the
callwhose elements are to be added to this attribute set attributes)Redeclares javax. Adds all of the elements in the specified set to this attribute. |
| add | back to summary |
|---|---|
| public boolean add(Attribute attribute) Redeclares javax. 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).
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(AttributeSet attributes) Redeclares javax. Adds all of the elements in the specified set to this attribute. The
outcome is the same as if the
The behavior of the
If the
| |