508 lines
28 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.print.attribute
</div>
<h2 class="title" title="Interface AttributeSet">Interface AttributeSet</h2>
</div><div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
All Known Subinterfaces:
</dt>
<dd>
<span><a href="../../../javax/print/attribute/DocAttributeSet.html" title="javax.print.attribute中的接口">DocAttributeSet</a> <a href="../../../javax/print/attribute/PrintJobAttributeSet.html" title="javax.print.attribute中的接口">PrintJobAttributeSet</a> <a href="../../../javax/print/attribute/PrintRequestAttributeSet.html" title="javax.print.attribute中的接口">PrintRequestAttributeSet</a> <a href="../../../javax/print/attribute/PrintServiceAttributeSet.html" title="javax.print.attribute中的接口">PrintServiceAttributeSet</a></span>
</dd>
</dl>
<dl>
<dt>
所有已知实现类:
</dt>
<dd>
<span><a href="../../../javax/print/attribute/HashAttributeSet.html" title="javax.print.attribute中的类">HashAttributeSet</a> <a href="../../../javax/print/attribute/HashDocAttributeSet.html" title="javax.print.attribute中的类">HashDocAttributeSet</a> <a href="../../../javax/print/attribute/HashPrintJobAttributeSet.html" title="javax.print.attribute中的类">HashPrintJobAttributeSet</a> <a href="../../../javax/print/attribute/HashPrintRequestAttributeSet.html" title="javax.print.attribute中的类">HashPrintRequestAttributeSet</a> <a href="../../../javax/print/attribute/HashPrintServiceAttributeSet.html" title="javax.print.attribute中的类">HashPrintServiceAttributeSet</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public interface <span class="typeNameLabel">AttributeSet</span></pre>
<div class="block">
<span>Interface AttributeSet指定一组打印属性的接口。</span>
<span>打印属性是类实现接口<a href="../../../javax/print/attribute/Attribute.html" title="javax.print.attribute中的接口"><code>Attribute</code></a>的对象。</span>
<p> <span>属性集包含一组<i>属性值,</i>其中集合中不允许重复的值。</span> <span>此外,属性集中的每个值都是某个<i>类别</i>的成员<i></i>并且在该集合中允许任何特定类别中的最多一个值。</span> <span>对于属性集,值为<a href="../../../javax/print/attribute/Attribute.html" title="javax.print.attribute中的接口"><code>Attribute</code></a>对象,类别为<a href="../../../java/lang/Class.html" title="java.lang中的类"><code></code></a>对象。</span> <span>属性类别是该类属性的类层次结构根目录下的类(或接口)。</span> <span>请注意,属性对象的类别可能是属性对象的类的超类,而不是属性对象的类本身。</span> <span>属性对象的类别是通过调用确定<a href="../../../javax/print/attribute/Attribute.html#getCategory--"><code>getCategory()</code></a>在接口中定义的方法<a href="../../../javax/print/attribute/Attribute.html" title="javax.print.attribute中的接口"><code>Attribute</code></a></span> </p>
<p> <span>AttributeSet的接口类似于Java Collections API的java.util.Map接口的接口但是它将接受的类型更具限制性并将键和值组合到一个Attribute中。</span> </p>
<p> <span>属性集在Print Service API的多个位置使用。</span> <span>在每个上下文中,只有某些种类的属性被允许出现在该属性集,如由该属性类实现加标签接口确定- <a href="../../../javax/print/attribute/DocAttribute.html" title="javax.print.attribute中的接口"><code>DocAttribute</code></a> <a href="../../../javax/print/attribute/PrintRequestAttribute.html" title="javax.print.attribute中的接口"><code>PrintRequestAttribute</code></a> <a href="../../../javax/print/attribute/PrintJobAttribute.html" title="javax.print.attribute中的接口"><code>PrintJobAttribute</code></a><a href="../../../javax/print/attribute/PrintServiceAttribute.html" title="javax.print.attribute中的接口"><code>PrintServiceAttribute</code></a></span> <span>但是也有一些限制为仅包含四种属性的一个属性组四个特- <a href="../../../javax/print/attribute/DocAttributeSet.html" title="javax.print.attribute中的接口"><code>DocAttributeSet</code></a> <a href="../../../javax/print/attribute/PrintRequestAttributeSet.html" title="javax.print.attribute中的接口"><code>PrintRequestAttributeSet</code></a> <a href="../../../javax/print/attribute/PrintJobAttributeSet.html" title="javax.print.attribute中的接口"><code>PrintJobAttributeSet</code></a><a href="../../../javax/print/attribute/PrintServiceAttributeSet.html" title="javax.print.attribute中的接口"><code>PrintServiceAttributeSet</code></a> ,分别。</span> <span>请注意,许多属性类实现多个标记接口,因此可能会出现在多个上下文中。</span> </p>
<ul>
<li> <span><a href="../../../javax/print/attribute/DocAttributeSet.html" title="javax.print.attribute中的接口"><code>DocAttributeSet</code></a> ,含有<a href="../../../javax/print/attribute/DocAttribute.html" title="javax.print.attribute中的接口"><code>DocAttribute</code></a> S指定单个文档和所述打印作业设置的特性以被应用到一个单独的文档。</span> <p></p></li>
<li> <span>一个<a href="../../../javax/print/attribute/PrintRequestAttributeSet.html" title="javax.print.attribute中的接口"><code>PrintRequestAttributeSet</code></a> ,含<a href="../../../javax/print/attribute/PrintRequestAttribute.html" title="javax.print.attribute中的接口"><code>PrintRequestAttribute</code></a> S指定设置应用到整个打印作业并在打印作业中所有文档。</span> <p></p></li>
<li> <span>A <a href="../../../javax/print/attribute/PrintJobAttributeSet.html" title="javax.print.attribute中的接口"><code>PrintJobAttributeSet</code></a> ,包含<a href="../../../javax/print/attribute/PrintJobAttribute.html" title="javax.print.attribute中的接口"><code>PrintJobAttribute</code></a> s报告打印作业的状态。</span> <p></p></li>
<li> <span>A <a href="../../../javax/print/attribute/PrintServiceAttributeSet.html" title="javax.print.attribute中的接口"><code>PrintServiceAttributeSet</code></a> ,包含<a href="../../../javax/print/attribute/PrintServiceAttribute.html" title="javax.print.attribute中的接口"><code>PrintServiceAttribute</code></a> s报告打印服务实例的状态。</span> </li>
</ul>
<p> <span>在某些情况下,只允许客户端检查属性集的内容,但不允许更改它们(该集合是只读的)。</span> <span>在其他地方,允许客户端检查和更改属性集的内容(集合是读写)。</span> <span>对于只读属性集调用mutating操作会引发UnmodifiableSetException。</span> </p>
<p> <span>Print Service API提供了一个接口AttributeSet的实现类别为<a href="../../../javax/print/attribute/HashAttributeSet.html" title="javax.print.attribute中的类"><code>HashAttributeSet</code></a></span> <span>客户端可以使用类别<a href="../../../javax/print/attribute/HashAttributeSet.html" title="javax.print.attribute中的类"><code>HashAttributeSet</code></a>或提供自己的接口AttributeSet的实现。</span> <span>打印服务API还提供接口AttributeSet的子接口的实现-班<a href="../../../javax/print/attribute/HashDocAttributeSet.html" title="javax.print.attribute中的类"><code>HashDocAttributeSet</code></a> <a href="../../../javax/print/attribute/HashPrintRequestAttributeSet.html" title="javax.print.attribute中的类"><code>HashPrintRequestAttributeSet</code></a> <a href="../../../javax/print/attribute/HashPrintJobAttributeSet.html" title="javax.print.attribute中的类"><code>HashPrintJobAttributeSet</code></a><a href="../../../javax/print/attribute/HashPrintServiceAttributeSet.html" title="javax.print.attribute中的类"><code>HashPrintServiceAttributeSet</code></a></span> </p>
<p></p>
</div> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t3"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#add-javax.print.attribute.Attribute-">add</a></span>(<a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> attribute)</code>
<div class="block">
如果指定的属性不存在,请将指定的属性添加到此属性集中,首先删除与指定的属性值相同的属性类别中的任何现有值。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#addAll-javax.print.attribute.AttributeSet-">addAll</a></span>(<a href="../../../javax/print/attribute/AttributeSet.html" title="interface in javax.print.attribute">AttributeSet</a> attributes)</code>
<div class="block">
将指定集合中的所有元素添加到此属性。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#clear--">clear</a></span>()</code>
<div class="block">
从该属性集中删除所有属性。
</div> </td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#containsKey-java.lang.Class-">containsKey</a></span>(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; category)</code>
<div class="block">
如果此属性集包含指定类别的属性,则返回
<tt>true</tt>
</div> </td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#containsValue-javax.print.attribute.Attribute-">containsValue</a></span>(<a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> attribute)</code>
<div class="block">
如果此属性集包含给定的属性值,则返回
<tt>true</tt>
</div> </td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#equals-java.lang.Object-">equals</a></span>(<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> object)</code>
<div class="block">
将指定的对象与此属性集进行比较以便相等。
</div> </td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code><a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#get-java.lang.Class-">get</a></span>(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; category)</code>
<div class="block">
返回此属性集在给定属性类别中包含的属性值。
</div> </td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#hashCode--">hashCode</a></span>()</code>
<div class="block">
返回此属性集的哈希码值。
</div> </td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#isEmpty--">isEmpty</a></span>()</code>
<div class="block">
如果此属性集不包含任何属性则返回true。
</div> </td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#remove-javax.print.attribute.Attribute-">remove</a></span>(<a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> attribute)</code>
<div class="block">
从该属性集中删除指定的属性(如果存在)。
</div> </td>
</tr>
<tr class="altColor" id="i10">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#remove-java.lang.Class-">remove</a></span>(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; category)</code>
<div class="block">
从此属性集中删除此类别的任何属性(如果存在)。
</div> </td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#size--">size</a></span>()</code>
<div class="block">
返回此属性集中的属性数。
</div> </td>
</tr>
<tr class="altColor" id="i12">
<td class="colFirst"><code><a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/print/attribute/AttributeSet.html#toArray--">toArray</a></span>()</code>
<div class="block">
返回此集合中包含的属性的数组。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="get-java.lang.Class-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>get</h4> <pre><a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> get(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; category)</pre>
<div class="block">
<span>返回此属性集在给定属性类别中包含的属性值。</span>
<span>如果此属性集不包含给定属性类别中的任何属性值,则返回<tt>null</tt></span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<span><code>category</code> - 要返回其关联属性值的属性类别。</span>
<span>它必须是<a href="../../../java/lang/Class.html" title="java.lang中的类"><code></code></a>实现接口<a href="../../../javax/print/attribute/Attribute.html" title="javax.print.attribute中的接口"><code>Attribute</code></a></span>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
此属性中包含给定属性类别中的属性值,或
<tt>null</tt>如果此属性集不包含给定的属性类别中的任何属性值。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - (未选中的异常)如果
<code>category</code>为空,则抛出。
</dd>
<dd>
<span><code><a href="../../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - (未经检查的异常)如果<code>category</code>不是实现<a href="../../../java/lang/Class.html" title="java.lang中的类">接口<code>Attribute</code><code></code></a> ,则<a href="../../../javax/print/attribute/Attribute.html" title="javax.print.attribute中的接口">抛出</a></span>
</dd>
</dl> </li>
</ul> <a name="add-javax.print.attribute.Attribute-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>add</h4> <pre>boolean add(<a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> attribute)</pre>
<div class="block">
如果指定的属性不存在,请将指定的属性添加到此属性集中,首先删除与指定的属性值相同的属性类别中的任何现有值。
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>attribute</code> - 要添加到此属性集的属性值。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果该属性集作为调用的结果发生更改,即给定的属性值不是此属性集的成员。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - (未经检查的异常)如果
<code>attribute</code>为空,则抛出。
</dd>
<dd>
<code><a href="../../../javax/print/attribute/UnmodifiableSetException.html" title="class in javax.print.attribute">UnmodifiableSetException</a></code> - (未经检查的异常)如果此属性集不支持
<code>add()</code>操作。
</dd>
</dl> </li>
</ul> <a name="remove-java.lang.Class-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>remove</h4> <pre>boolean remove(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; category)</pre>
<div class="block">
<span>从此属性集中删除此类别的任何属性(如果存在)。</span>
<span>如果<code>category</code>为空,则<code>remove()</code>不执行任何操作并返回<tt>false</tt></span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>category</code> - 要从此属性集中删除的属性类别。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果此属性集由于调用而更改,即给定的属性值已成为此属性集的成员。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/print/attribute/UnmodifiableSetException.html" title="class in javax.print.attribute">UnmodifiableSetException</a></code> - (未经检查的异常)如果此属性集不支持
<code>remove()</code>操作。
</dd>
</dl> </li>
</ul> <a name="remove-javax.print.attribute.Attribute-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>remove</h4> <pre>boolean remove(<a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> attribute)</pre>
<div class="block">
<span>从该属性集中删除指定的属性(如果存在)。</span>
<span>如果<code>attribute</code>为空,则<code>remove()</code>不执行任何操作并返回<tt>false</tt></span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>attribute</code> - 要从此属性集中删除的属性值。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果此属性集作为调用的结果而更改,即给定的属性值已成为此属性集的成员。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/print/attribute/UnmodifiableSetException.html" title="class in javax.print.attribute">UnmodifiableSetException</a></code> - (未经检查的异常)如果此属性集不支持
<code>remove()</code>操作。
</dd>
</dl> </li>
</ul> <a name="containsKey-java.lang.Class-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>containsKey</h4> <pre>boolean containsKey(<a href="../../../java/lang/Class.html" title="class in java.lang"></a>&lt;?&gt; category)</pre>
<div class="block">
如果此属性集包含指定类别的属性,则返回
<tt>true</tt>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>category</code> - 在此属性集中的存在将被测试。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果此属性集包含指定类别的属性值。
</dd>
</dl> </li>
</ul> <a name="containsValue-javax.print.attribute.Attribute-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>containsValue</h4> <pre>boolean containsValue(<a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a> attribute)</pre>
<div class="block">
如果此属性集包含给定的属性值,则返回
<tt>true</tt>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>attribute</code> - 要测试其在该属性集中的属性值。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果此属性集包含给定的属性值。
</dd>
</dl> </li>
</ul> <a name="addAll-javax.print.attribute.AttributeSet-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>addAll</h4> <pre>boolean addAll(<a href="../../../javax/print/attribute/AttributeSet.html" title="interface in javax.print.attribute">AttributeSet</a> attributes)</pre>
<div class="block">
<span>将指定集合中的所有元素添加到此属性。</span>
<span>结果与从指定集合中的每个元素连续应用到该属性集的= <a href="../../../javax/print/attribute/AttributeSet.html#add-javax.print.attribute.Attribute-"><code>add(Attribute)</code></a>操作相同。</span>
<span>如果在操作进行中修改了指定的集合,那么<code>addAll(AttributeSet)</code>操作的行为是未指定的。</span>
<p> <span>如果<code>addAll(AttributeSet)</code>操作引发异常,对该属性集的状态的影响是依赖于实现的;</span> <span>在异常点之前的指定集合中的元素可能已经被添加到该属性集中,也可能不被添加到该属性集中。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>attributes</code> - 其元素将被添加到此属性集。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果此属性集由于调用而更改。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/print/attribute/UnmodifiableSetException.html" title="class in javax.print.attribute">UnmodifiableSetException</a></code> - (未检查异常)如果此属性集不支持
<tt>addAll(AttributeSet)</tt>方法,则抛出此异常。
</dd>
<dd>
<code><a href="../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - (未检查的异常)如果指定集合中的某些元素为空,则抛出。
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<a href="../../../javax/print/attribute/AttributeSet.html#add-javax.print.attribute.Attribute-"><code>add(Attribute)</code></a>
</dd>
</dl> </li>
</ul> <a name="size--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>size</h4> <pre>int size()</pre>
<div class="block">
<span>返回此属性集中的属性数。</span>
<span>如果此属性集包含超过<tt>Integer.MAX_VALUE个</tt>元素,则返回<tt>Integer.MAX_VALUE</tt></span>
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
此属性集中的属性数。
</dd>
</dl> </li>
</ul> <a name="toArray--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>toArray</h4> <pre><a href="../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a>[] toArray()</pre>
<div class="block">
返回此集合中包含的属性的数组。
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
该集合中包含的属性为数组如果AttributeSet为空则为零长度。
</dd>
</dl> </li>
</ul> <a name="clear--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>clear</h4> <pre>void clear()</pre>
<div class="block">
从该属性集中删除所有属性。
</div>
<dl>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/print/attribute/UnmodifiableSetException.html" title="class in javax.print.attribute">UnmodifiableSetException</a></code> - (未经检查的异常)如果此属性集不支持
<code>clear()</code>操作。
</dd>
</dl> </li>
</ul> <a name="isEmpty--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>isEmpty</h4> <pre>boolean isEmpty()</pre>
<div class="block">
如果此属性集不包含任何属性则返回true。
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
如果此属性集不包含属性则为true。
</dd>
</dl> </li>
</ul> <a name="equals-java.lang.Object-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>equals</h4> <pre>boolean equals(<a href="../../../java/lang/Object.html" title="class in java.lang">Object</a> object)</pre>
<div class="block">
<span>将指定的对象与此属性集进行比较以便相等。</span>
<span>如果给定的对象也是属性集,并且两个属性集包含相同的属性类别属性值映射,则返回<tt>true</tt></span>
<span>这样可确保<tt>equals()</tt>方法在AttributeSet接口的不同实现中正常工作。</span>
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../java/lang/Object.html#equals-java.lang.Object-">equals</a></code>
<code><a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></code>
</dd>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>object</code> - 要与此属性集进行比较。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>true</tt>如果指定的对象等于该属性集。
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<span><a href="../../../java/lang/Object.html#hashCode--"><code>Object.hashCode()</code></a> <a href="../../../java/util/HashMap.html" title="java.util中的类"><code>HashMap</code></a></span>
</dd>
</dl> </li>
</ul> <a name="hashCode--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>hashCode</h4> <pre>int hashCode()</pre>
<div class="block">
<span>返回此属性集的哈希码值。</span>
<span>属性集的哈希码被定义为AttributeSet中每个条目的哈希码的总和。</span>
<span>这确保<tt>t1.equals(t2)</tt>意味着<tt>t1.hashCode()==t2.hashCode()</tt>对于任何两个属性集<tt>t1</tt><tt>t2</tt> ,根据<tt><code>Object.hashCode()</code></tt>的一般合同的<a href="../../../java/lang/Object.html#hashCode--">要求</a></span>
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../java/lang/Object.html#hashCode--">hashCode</a></code>
<code><a href="../../../java/lang/Object.html" title="class in java.lang">Object</a></code>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
该属性集的哈希码值。
</dd>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<a href="../../../java/lang/Object.html#equals-java.lang.Object-"><code>Object.equals(java.lang.Object)</code></a>
<a href="../../../java/lang/System.html#identityHashCode-java.lang.Object-"><code>System.identityHashCode(java.lang.Object)</code></a>
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>