javax.print.attribute

Interface PrintServiceAttributeSet

public interface PrintServiceAttributeSet extends AttributeSet

PrintServiceAttributeSet specifies an attribute set which only allows printing attributes of type {@link javax.print.attribute.PrintServiceAttribute}.

The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are respecified in this interface to indicate that only PrintServiceAttribute instances are allowed in this set.

Method Summary
booleanadd(Attribute attribute)
Adds the specified attribute value to this attribute set if it is not already present.
booleanaddAll(AttributeSet attributes)
Adds all of the elements in the specified set to this attribute set.

Method Detail

add

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

Parameters: attribute the attribute to add.

Returns: true if the set is changed, false otherwise.

Throws: ClassCastException if attribute is not of type PrintServiceAttribute. NullPointerException if the attribute is null. UnmodifiableSetException if the set does not support modification.

addAll

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

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 PrintServiceAttribute. UnmodifiableSetException if the set does not support modification.

See Also: add