javax.print.attribute
Class HashAttributeSet

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.print.attribute.HashAttributeSet
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Direct Known Subclasses:
HashDocAttributeSet sample code for javax.print.attribute.HashDocAttributeSet definition code for javax.print.attribute.HashDocAttributeSet , HashPrintJobAttributeSet sample code for javax.print.attribute.HashPrintJobAttributeSet definition code for javax.print.attribute.HashPrintJobAttributeSet , HashPrintRequestAttributeSet sample code for javax.print.attribute.HashPrintRequestAttributeSet definition code for javax.print.attribute.HashPrintRequestAttributeSet , HashPrintServiceAttributeSet sample code for javax.print.attribute.HashPrintServiceAttributeSet definition code for javax.print.attribute.HashPrintServiceAttributeSet

public class HashAttributeSet
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

Class HashAttributeSet provides an AttributeSet implementation with characteristics of a hash map.

See Also:
Serialized Form

Constructor Summary
  HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet() definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet() ()
          Construct a new, empty attribute set.
  HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
          Construct a new attribute set, initially populated with the given attribute.
  HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute[]) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute[]) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute [] attributes)
          Construct a new attribute set, initially populated with the values from the given array.
protected HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute[], java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute[], java.lang.Class) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute [] attributes, Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
          Construct a new attribute set, where the members of the attribute set are restricted to the given interface.
protected HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute, java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.Attribute, java.lang.Class) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute, Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
          Construct a new attribute set, initially populated with the given attribute, where the members of the attribute set are restricted to the given interface.
  HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.AttributeSet) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.AttributeSet) (AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet  attributes)
          Construct a new attribute set, initially populated with the values from the given set.
protected HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.AttributeSet, java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(javax.print.attribute.AttributeSet, java.lang.Class) (AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet  attributes, Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
          Construct a new attribute set, initially populated with the values from the given set where the members of the attribute set are restricted to the given interface.
protected HashAttributeSet sample code for javax.print.attribute.HashAttributeSet.HashAttributeSet(java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.HashAttributeSet(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
          Construct a new, empty attribute set, where the members of the attribute set are restricted to the given interface.
 
Method Summary
 boolean add sample code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
          Adds the specified attribute to this attribute set if it is not already present, first removing any existing in the same attribute category as the specified attribute value.
 boolean addAll sample code for javax.print.attribute.HashAttributeSet.addAll(javax.print.attribute.AttributeSet) definition code for javax.print.attribute.HashAttributeSet.addAll(javax.print.attribute.AttributeSet) (AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet  attributes)
          Adds all of the elements in the specified set to this attribute.
 void clear sample code for javax.print.attribute.HashAttributeSet.clear() definition code for javax.print.attribute.HashAttributeSet.clear() ()
          Removes all attributes from this attribute set.
 boolean containsKey sample code for javax.print.attribute.HashAttributeSet.containsKey(java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.containsKey(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <?> category)
          Returns true if this attribute set contains an attribute for the specified category.
 boolean containsValue sample code for javax.print.attribute.HashAttributeSet.containsValue(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.containsValue(javax.print.attribute.Attribute) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
          Returns true if this attribute set contains the given attribute.
 boolean equals sample code for javax.print.attribute.HashAttributeSet.equals(java.lang.Object) definition code for javax.print.attribute.HashAttributeSet.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  object)
          Compares the specified object with this attribute set for equality.
 Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute get sample code for javax.print.attribute.HashAttributeSet.get(java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.get(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <?> category)
          Returns the attribute value which this attribute set contains in the given attribute category.
 int hashCode sample code for javax.print.attribute.HashAttributeSet.hashCode() definition code for javax.print.attribute.HashAttributeSet.hashCode() ()
          Returns the hash code value for this attribute set.
 boolean isEmpty sample code for javax.print.attribute.HashAttributeSet.isEmpty() definition code for javax.print.attribute.HashAttributeSet.isEmpty() ()
          Returns true if this attribute set contains no attributes.
 boolean remove sample code for javax.print.attribute.HashAttributeSet.remove(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.remove(javax.print.attribute.Attribute) (Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
          Removes the specified attribute from this attribute set if present.
 boolean remove sample code for javax.print.attribute.HashAttributeSet.remove(java.lang.Class) definition code for javax.print.attribute.HashAttributeSet.remove(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <?> category)
          Removes any attribute for this category from this attribute set if present.
 int size sample code for javax.print.attribute.HashAttributeSet.size() definition code for javax.print.attribute.HashAttributeSet.size() ()
          Returns the number of attributes in this attribute set.
 Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute [] toArray sample code for javax.print.attribute.HashAttributeSet.toArray() definition code for javax.print.attribute.HashAttributeSet.toArray() ()
          Returns an array of the attributes contained in this set.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet() definition code for javax.print.attribute.HashAttributeSet()

public HashAttributeSet()
Construct a new, empty attribute set.


HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute)

public HashAttributeSet(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
Construct a new attribute set, initially populated with the given attribute.

Parameters:
attribute - Attribute value to add to the set.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if attribute is null.

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute[]) definition code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute[])

public HashAttributeSet(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute [] attributes)
Construct a new attribute set, initially populated with the values from the given array. The new attribute set is populated by adding the elements of attributes array to the set in sequence, starting at index 0. Thus, later array elements may replace earlier array elements if the array contains duplicate attribute values or attribute categories.

Parameters:
attributes - Array of attribute values to add to the set. If null, an empty attribute set is constructed.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if any element of attributes is null.

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(javax.print.attribute.AttributeSet) definition code for javax.print.attribute.HashAttributeSet(javax.print.attribute.AttributeSet)

public HashAttributeSet(AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet  attributes)
Construct a new attribute set, initially populated with the values from the given set.

Parameters:
attributes - Set of attributes from which to initialise this set. If null, an empty attribute set is constructed.

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet(java.lang.Class<?>)

protected HashAttributeSet(Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
Construct a new, empty attribute set, where the members of the attribute set are restricted to the given interface.

Parameters:
interfaceName - The interface of which all members of this attribute set must be an instance. It is assumed to be interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute or a subinterface thereof.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if interfaceName is null.

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute, java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute, java.lang.Class<?>)

protected HashAttributeSet(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute,
                           Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
Construct a new attribute set, initially populated with the given attribute, where the members of the attribute set are restricted to the given interface.

Parameters:
attribute - Attribute value to add to the set.
interfaceName - The interface of which all members of this attribute set must be an instance. It is assumed to be interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute or a subinterface thereof.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if attribute is null.
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if interfaceName is null.
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - (unchecked exception) Thrown if attribute is not an instance of interfaceName.

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute[], java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet(javax.print.attribute.Attribute[], java.lang.Class<?>)

protected HashAttributeSet(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute [] attributes,
                           Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
Construct a new attribute set, where the members of the attribute set are restricted to the given interface. The new attribute set is populated by adding the elements of attributes array to the set in sequence, starting at index 0. Thus, later array elements may replace earlier array elements if the array contains duplicate attribute values or attribute categories.

Parameters:
attributes - Array of attribute values to add to the set. If null, an empty attribute set is constructed.
interfaceName - The interface of which all members of this attribute set must be an instance. It is assumed to be interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute or a subinterface thereof.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if any element of attributes is null.
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if interfaceName is null.
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - (unchecked exception) Thrown if any element of attributes is not an instance of interfaceName.

HashAttributeSet sample code for javax.print.attribute.HashAttributeSet(javax.print.attribute.AttributeSet, java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet(javax.print.attribute.AttributeSet, java.lang.Class<?>)

protected HashAttributeSet(AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet  attributes,
                           Class sample code for java.lang.Class definition code for java.lang.Class <?> interfaceName)
Construct a new attribute set, initially populated with the values from the given set where the members of the attribute set are restricted to the given interface.

Parameters:
attributes - set of attribute values to initialise the set. If null, an empty attribute set is constructed.
interfaceName - The interface of which all members of this attribute set must be an instance. It is assumed to be interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute or a subinterface thereof.
Throws:
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - (unchecked exception) Thrown if any element of attributes is not an instance of interfaceName.
Method Detail

get sample code for javax.print.attribute.HashAttributeSet.get(java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet.get(java.lang.Class<?>)

public Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  get(Class sample code for java.lang.Class definition code for java.lang.Class <?> category)
Returns the attribute value which this attribute set contains in the given attribute category. Returns null if this attribute set does not contain any attribute value in the given attribute category.

Specified by:
get sample code for javax.print.attribute.AttributeSet.get(java.lang.Class) definition code for javax.print.attribute.AttributeSet.get(java.lang.Class) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
category - Attribute category whose associated attribute value is to be returned. It must be a Class sample code for java.lang.Class definition code for java.lang.Class that implements interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute .
Returns:
The attribute value in the given attribute category contained in this attribute set, or null if this attribute set does not contain any attribute value in the given attribute category.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if the category is null.
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - (unchecked exception) Thrown if the category is not a Class sample code for java.lang.Class definition code for java.lang.Class that implements interface Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute .

add sample code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute)

public boolean add(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
Adds the specified attribute to this attribute set if it is not already present, first removing any existing in the same attribute category as the specified attribute value.

Specified by:
add sample code for javax.print.attribute.AttributeSet.add(javax.print.attribute.Attribute) definition code for javax.print.attribute.AttributeSet.add(javax.print.attribute.Attribute) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
attribute - Attribute value to be added to this attribute set.
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.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if the attribute is null.
UnmodifiableSetException sample code for javax.print.attribute.UnmodifiableSetException definition code for javax.print.attribute.UnmodifiableSetException - (unchecked exception) Thrown if this attribute set does not support the add() operation.

remove sample code for javax.print.attribute.HashAttributeSet.remove(java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet.remove(java.lang.Class<?>)

public boolean remove(Class sample code for java.lang.Class definition code for java.lang.Class <?> category)
Removes any attribute for this category from this attribute set if present. If category is null, then remove() does nothing and returns false.

Specified by:
remove sample code for javax.print.attribute.AttributeSet.remove(java.lang.Class) definition code for javax.print.attribute.AttributeSet.remove(java.lang.Class) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
category - Attribute category to be removed from this attribute set.
Returns:
true if this attribute set changed as a result of the call, i.e., the given attribute category had been a member of this attribute set.
Throws:
UnmodifiableSetException sample code for javax.print.attribute.UnmodifiableSetException definition code for javax.print.attribute.UnmodifiableSetException - (unchecked exception) Thrown if this attribute set does not support the remove() operation.

remove sample code for javax.print.attribute.HashAttributeSet.remove(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.remove(javax.print.attribute.Attribute)

public boolean remove(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
Removes the specified attribute from this attribute set if present. If attribute is null, then remove() does nothing and returns false.

Specified by:
remove sample code for javax.print.attribute.AttributeSet.remove(javax.print.attribute.Attribute) definition code for javax.print.attribute.AttributeSet.remove(javax.print.attribute.Attribute) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
attribute - Attribute value to be removed from this attribute set.
Returns:
true if this attribute set changed as a result of the call, i.e., the given attribute value had been a member of this attribute set.
Throws:
UnmodifiableSetException sample code for javax.print.attribute.UnmodifiableSetException definition code for javax.print.attribute.UnmodifiableSetException - (unchecked exception) Thrown if this attribute set does not support the remove() operation.

containsKey sample code for javax.print.attribute.HashAttributeSet.containsKey(java.lang.Class<?>) definition code for javax.print.attribute.HashAttributeSet.containsKey(java.lang.Class<?>)

public boolean containsKey(Class sample code for java.lang.Class definition code for java.lang.Class <?> category)
Returns true if this attribute set contains an attribute for the specified category.

Specified by:
containsKey sample code for javax.print.attribute.AttributeSet.containsKey(java.lang.Class) definition code for javax.print.attribute.AttributeSet.containsKey(java.lang.Class) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
category - whose presence in this attribute set is to be tested.
Returns:
true if this attribute set contains an attribute value for the specified category.

containsValue sample code for javax.print.attribute.HashAttributeSet.containsValue(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.containsValue(javax.print.attribute.Attribute)

public boolean containsValue(Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute  attribute)
Returns true if this attribute set contains the given attribute.

Specified by:
containsValue sample code for javax.print.attribute.AttributeSet.containsValue(javax.print.attribute.Attribute) definition code for javax.print.attribute.AttributeSet.containsValue(javax.print.attribute.Attribute) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
attribute - value whose presence in this attribute set is to be tested.
Returns:
true if this attribute set contains the given attribute value.

addAll sample code for javax.print.attribute.HashAttributeSet.addAll(javax.print.attribute.AttributeSet) definition code for javax.print.attribute.HashAttributeSet.addAll(javax.print.attribute.AttributeSet)

public boolean addAll(AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet  attributes)
Adds all of the elements in the specified set to this attribute. The outcome is the same as if the add(Attribute) sample code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute) operation had been applied to this attribute set successively with each element from the specified set. The behavior of the addAll(AttributeSet) operation is unspecified if the specified set is modified while the operation is in progress.

If the addAll(AttributeSet) operation throws an exception, the effect on this attribute set's state is implementation dependent; elements from the specified set before the point of the exception may or may not have been added to this attribute set.

Specified by:
addAll sample code for javax.print.attribute.AttributeSet.addAll(javax.print.attribute.AttributeSet) definition code for javax.print.attribute.AttributeSet.addAll(javax.print.attribute.AttributeSet) in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Parameters:
attributes - whose elements are to be added to this attribute set.
Returns:
true if this attribute set changed as a result of the call.
Throws:
UnmodifiableSetException sample code for javax.print.attribute.UnmodifiableSetException definition code for javax.print.attribute.UnmodifiableSetException - (Unchecked exception) Thrown if this attribute set does not support the addAll(AttributeSet) method.
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (Unchecked exception) Thrown if some element in the specified set is null, or the set is null.
See Also:
add(Attribute) sample code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute) definition code for javax.print.attribute.HashAttributeSet.add(javax.print.attribute.Attribute)

size sample code for javax.print.attribute.HashAttributeSet.size() definition code for javax.print.attribute.HashAttributeSet.size()

public int size()
Returns the number of attributes in this attribute set. If this attribute set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Specified by:
size sample code for javax.print.attribute.AttributeSet.size() definition code for javax.print.attribute.AttributeSet.size() in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Returns:
The number of attributes in this attribute set.

toArray sample code for javax.print.attribute.HashAttributeSet.toArray() definition code for javax.print.attribute.HashAttributeSet.toArray()

public Attribute sample code for javax.print.attribute.Attribute definition code for javax.print.attribute.Attribute [] toArray()
Description copied from interface: AttributeSet sample code for javax.print.attribute.AttributeSet.toArray() definition code for javax.print.attribute.AttributeSet.toArray()
Returns an array of the attributes contained in this set.

Specified by:
toArray sample code for javax.print.attribute.AttributeSet.toArray() definition code for javax.print.attribute.AttributeSet.toArray() in interface AttributeSet sample code for javax.print.attribute.AttributeSet definition code for javax.print.attribute.AttributeSet
Returns:
the Attributes contained in this set as an array, zero length if the AttributeSet is empty.

clear sample code for javax.print.attribute.HashAttributeSet.clear() definition code for javax.print.attribute.HashAttributeSet.clear()

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

Specified by:
clear sample code for javax.print.attribute.AttributeSet.clear() definition code for javax.print.attribute.AttributeSet.clear()