HashDocAttributeSet (Java SE 15 & JDK 15) (original) (raw)
All Implemented Interfaces:
[Serializable](../../../../java.base/java/io/Serializable.html "interface in java.io")
, [AttributeSet](AttributeSet.html "interface in javax.print.attribute")
, [DocAttributeSet](DocAttributeSet.html "interface in javax.print.attribute")
public class HashDocAttributeSet extends HashAttributeSet implements DocAttributeSet, Serializable
Class HashDocAttributeSet
provides an attribute set which inherits its implementation from class HashAttributeSet and enforces the semantic restrictions of interfaceDocAttributeSet.
See Also:
Constructor Summary
Constructors
Constructor | Description |
---|---|
HashDocAttributeSet() | Construct a new, empty hash doc attribute set. |
HashDocAttributeSet(DocAttribute attribute) | Construct a new hash doc attribute set, initially populated with the given value. |
HashDocAttributeSet(DocAttribute[] attributes) | Construct a new hash doc attribute set, initially populated with the values from the given array. |
HashDocAttributeSet(DocAttributeSet attributes) | 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 DocAttribute interface. |
Method Summary
Methods declared in class javax.print.attribute.HashAttributeSet
[add](HashAttributeSet.html#add%28javax.print.attribute.Attribute%29), [addAll](HashAttributeSet.html#addAll%28javax.print.attribute.AttributeSet%29), [clear](HashAttributeSet.html#clear%28%29), [containsKey](HashAttributeSet.html#containsKey%28java.lang.Class%29), [containsValue](HashAttributeSet.html#containsValue%28javax.print.attribute.Attribute%29), [equals](HashAttributeSet.html#equals%28java.lang.Object%29), [get](HashAttributeSet.html#get%28java.lang.Class%29), [hashCode](HashAttributeSet.html#hashCode%28%29), [isEmpty](HashAttributeSet.html#isEmpty%28%29), [remove](HashAttributeSet.html#remove%28java.lang.Class%29), [remove](HashAttributeSet.html#remove%28javax.print.attribute.Attribute%29), [size](HashAttributeSet.html#size%28%29), [toArray](HashAttributeSet.html#toArray%28%29)
Methods declared in interface javax.print.attribute.AttributeSet
[clear](AttributeSet.html#clear%28%29), [containsKey](AttributeSet.html#containsKey%28java.lang.Class%29), [containsValue](AttributeSet.html#containsValue%28javax.print.attribute.Attribute%29), [equals](AttributeSet.html#equals%28java.lang.Object%29), [get](AttributeSet.html#get%28java.lang.Class%29), [hashCode](AttributeSet.html#hashCode%28%29), [isEmpty](AttributeSet.html#isEmpty%28%29), [remove](AttributeSet.html#remove%28java.lang.Class%29), [remove](AttributeSet.html#remove%28javax.print.attribute.Attribute%29), [size](AttributeSet.html#size%28%29), [toArray](AttributeSet.html#toArray%28%29)
Constructor Details
HashDocAttributeSet
public HashDocAttributeSet()
Construct a new, empty hash doc attribute set.HashDocAttributeSet
public HashDocAttributeSet(DocAttribute attribute)
Construct a new hash doc attribute set, initially populated with the given value.
Parameters:
attribute
- attribute value to add to the set
Throws:
[NullPointerException](../../../../java.base/java/lang/NullPointerException.html "class in java.lang")
- ifattribute
isnull
HashDocAttributeSet
public HashDocAttributeSet(DocAttribute[] attributes)
Construct a new hash doc attribute set, initially populated with the values from the given array. The new attribute set is populated by adding the elements ofattributes
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. Ifnull
, an empty attribute set is constructed.
Throws:
[NullPointerException](../../../../java.base/java/lang/NullPointerException.html "class in java.lang")
- if any element ofattributes
isnull
HashDocAttributeSet
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
DocAttribute
interface.
Parameters:
attributes
- set of attribute values to initialise the set. Ifnull
, an empty attribute set is constructed.
Throws:
[ClassCastException](../../../../java.base/java/lang/ClassCastException.html "class in java.lang")
- if any element ofattributes
is not an instance ofDocAttribute