javax.print.attribute
Interface PrintJobAttributeSet

All Superinterfaces:
AttributeSet
All Known Implementing Classes:
HashPrintJobAttributeSet

public interface PrintJobAttributeSet
extends AttributeSet

PrintJobAttributeSet specifies an attribute set which only allows printing attributes of type PrintJobAttribute.

The methods add(Attribute) and addAll(AttributeSet) are respecified in this interface to indicate that only PrintJobAttribute instances are allowed in this set.


Method Summary
 boolean add(Attribute attribute)
          Adds the specified attribute value to this attribute set if it is not already present.
 boolean addAll(AttributeSet attributes)
          Adds all of the elements in the specified set to this attribute set.
 
Methods inherited from interface javax.print.attribute.AttributeSet
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, remove, remove, size, toArray
 

Method Detail

add

boolean add(Attribute attribute)
Adds the specified attribute value to this attribute set if it is not already present. This operation removes any existing attribute of the same category before adding the given attribute.

Specified by:
add in interface AttributeSet
Parameters:
attribute - the attribute to add.
Returns:
true if the set is changed, false otherwise.
Throws:
ClassCastException - if attribute is not of type PrintJobAttribute.
NullPointerException - if the attribute is null.
UnmodifiableSetException - if the set does not support modification.

addAll

boolean addAll(AttributeSet attributes)
Adds all of the elements in the specified set to this attribute set.

Specified by:
addAll in interface AttributeSet
Parameters:
attributes - the set of attributes to add.
Returns:
true if the set is changed, false otherwise.
Throws:
ClassCastException - if one of the attributes is not of type PrintJobAttribute.
UnmodifiableSetException - if the set does not support modification.
See Also:
add(Attribute)