uTools-Manuals/docs/java/javax/print/attribute/standard/PrinterStateReasons.html

414 lines
32 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.standard
</div>
<h2 class="title" title="Class PrinterStateReasons">Class PrinterStateReasons</h2>
</div><div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../java/util/AbstractMap.html" title="class in java.util">java.util.AbstractMap</a>&lt;K,V&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../java/util/HashMap.html" title="class in java.util">java.util.HashMap</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>,<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a>&gt;</li>
<li>
<ul class="inheritance">
<li>javax.print.attribute.standard.PrinterStateReasons</li>
</ul> </li>
</ul> </li>
</ul> </li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
All Implemented Interfaces:
</dt>
<dd>
<span><a href="../../../../java/io/Serializable.html" title="java.io中的接口">Serializable</a> <a href="../../../../java/lang/Cloneable.html" title="java.lang中的接口">Cloneable</a> <a href="../../../../java/util/Map.html" title="java.util中的接口">Map</a> &lt; <a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类">PrinterStateReason</a> <a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类">Severity</a> &gt; <a href="../../../../javax/print/attribute/Attribute.html" title="javax.print.attribute中的接口">Attribute</a> <a href="../../../../javax/print/attribute/PrintServiceAttribute.html" title="javax.print.attribute中的接口">PrintServiceAttribute</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public final class <span class="typeNameLabel">PrinterStateReasons</span>
extends <a href="../../../../java/util/HashMap.html" title="class in java.util">HashMap</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>,<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a>&gt;
implements <a href="../../../../javax/print/attribute/PrintServiceAttribute.html" title="interface in javax.print.attribute">PrintServiceAttribute</a></pre>
<div class="block">
<span>PrinterStateReasons类是打印属性类一组枚举值它提供有关打印机当前状态的其他信息即增加打印机<a href="../../../../javax/print/attribute/standard/PrinterState.html" title="javax.print.attribute.standard中的类"><code>PrinterState</code></a>属性值的信息。</span>
<p> <span><code>PrinterStateReason</code><a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类">实例</a>不会直接出现在打印服务的属性集中。</span> <span>相反PrinterStateReasons属性出现在打印服务的属性集中。</span> <span>的PrinterStateReasons属性包含零个一个或多于一个<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a> ,其涉及到打印服务的状态的对象,并且每个<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象与相关联<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>水平REPORT最不严重警告或错误最严重的。</span> <span>当打印机的相应条件变为真时,打印机将<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象添加到打印服务的PrinterStateReasons属性而当相应条件变为false时打印机将再次删除<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象,无论打印服务的整体<a href="../../../../javax/print/attribute/standard/PrinterState.html" title="javax.print.attribute.standard中的类"><code>PrinterState</code>是否</a>也更改。</span> </p>
<p> <span>PrinterStateReasons类继承自<code>java.util.HashMap</code>类的<a href="../../../../java/util/HashMap.html" title="java.util中的类">实现</a></span> <span>地图中的每个条目由<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象(关键字)映射到<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>对象(值)组成:</span> </p>
<p> <span>与大多数不可变的打印属性不同PrinterStateReasons类被设计为可变的;</span> <span>您可以将<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象添加到现有的PrinterStateReasons对象中并再次删除它们。</span> <span>但是,像<a href="../../../../java/util/HashMap.html" title="java.util中的类"><code>java.util.HashMap</code></a>类一样, <a href="../../../../java/util/HashMap.html" title="java.util中的类">PrinterStateReasons</a>类不是多线程安全的。</span> <span>如果多个线程使用PrinterStateReasons对象请确保同步其操作例如使用从类别<a href="../../../../java/util/Collections.html" title="java.util中的类"><code>java.util.Collections</code></a>获取的同步映射视图)。</span> </p>
<p> <span><b>IPP兼容性</b>每个单独的<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象和相关联的<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>对象的<code>toString()</code>方法返回的字符串值与其间连字符( <code>"-"</code> 连接在一起提供IPP关键字值。</span> <span><code>getName()</code>返回的类别名称提供IPP属性名称。</span> </p>
<p></p>
</div>
<dl>
<dt>
<span class="seeLabel">另请参见:</span>
</dt>
<dd>
<a href="../../../../serialized-form.html#javax.print.attribute.standard.PrinterStateReasons">Serialized Form</a>
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- --> </a> <h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.java.util.AbstractMap">
<!-- --> </a> <h3>Nested classes/interfaces inherited from class java.util.<a href="../../../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a></h3> <code><a href="../../../../java/util/AbstractMap.SimpleEntry.html" title="class in java.util">AbstractMap.SimpleEntry</a>&lt;<a href="../../../../java/util/AbstractMap.SimpleEntry.html" title="type parameter in AbstractMap.SimpleEntry">K</a>,<a href="../../../../java/util/AbstractMap.SimpleEntry.html" title="type parameter in AbstractMap.SimpleEntry">V</a>&gt;, <a href="../../../../java/util/AbstractMap.SimpleImmutableEntry.html" title="class in java.util">AbstractMap.SimpleImmutableEntry</a>&lt;<a href="../../../../java/util/AbstractMap.SimpleImmutableEntry.html" title="type parameter in AbstractMap.SimpleImmutableEntry">K</a>,<a href="../../../../java/util/AbstractMap.SimpleImmutableEntry.html" title="type parameter in AbstractMap.SimpleImmutableEntry">V</a>&gt;</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.java.util.Map">
<!-- --> </a> <h3>Nested classes/interfaces inherited from interface java.util.<a href="../../../../java/util/Map.html" title="interface in java.util">Map</a></h3> <code><a href="../../../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../../../java/util/Map.Entry.html" title="type parameter in Map.Entry">K</a>,<a href="../../../../java/util/Map.Entry.html" title="type parameter in Map.Entry">V</a>&gt;</code></li>
</ul> </li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- --> </a> <h3>构造方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption>
<span>构造方法</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#PrinterStateReasons--">PrinterStateReasons</a></span>()</code>
<div class="block">
<span>构造一个新的,空的打印机状态原因属性;</span>
<span>底层哈希映射具有默认的初始容量和负载因子。</span>
</div> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#PrinterStateReasons-int-">PrinterStateReasons</a></span>(int initialCapacity)</code>
<div class="block">
<span>超级新的,空的打印机状态原因属性;</span>
<span>底层哈希映射具有给定的初始容量和默认负载因子。</span>
</div> </td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#PrinterStateReasons-int-float-">PrinterStateReasons</a></span>(int initialCapacity, float loadFactor)</code>
<div class="block">
<span>构造一个新的,空的打印机状态原因属性;</span>
<span>底层哈希映射具有给定的初始容量和负载因子。</span>
</div> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#PrinterStateReasons-java.util.Map-">PrinterStateReasons</a></span>(<a href="../../../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>,<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a>&gt; map)</code>
<div class="block">
<span>构造一个新的打印机状态原因属性,其中包含与给定地图相同的<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code>-</a> <a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类">to-<code>Severity</code></a>映射。</span>
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ========== 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="t4"><span><a href="javascript:show(8);">具体的方法</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><a href="../../../../java/lang/Class.html" title="class in java.lang"></a>&lt;? extends <a href="../../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#getCategory--">getCategory</a></span>()</code>
<div class="block">
获取要用作此打印属性值的“类别”的打印属性类。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="../../../../java/lang/String.html" title="class in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#getName--">getName</a></span>()</code>
<div class="block">
获取此属性值是一个实例的类别的名称。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code><a href="../../../../java/util/Set.html" title="interface in java.util">Set</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#printerStateReasonSet-javax.print.attribute.standard.Severity-">printerStateReasonSet</a></span>(<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a> severity)</code>
<div class="block">
在此PrinterStateReasons属性中以给定的严重级别获取不可修改的打印机状态原因属性的集合视图。
</div> </td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code><a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/print/attribute/standard/PrinterStateReasons.html#put-javax.print.attribute.standard.PrinterStateReason-javax.print.attribute.standard.Severity-">put</a></span>(<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a> reason, <a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a> severity)</code>
<div class="block">
将给定的打印机状态原因添加到此打印机状态原因属性,将其与给定的严重性级别相关联。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.util.HashMap">
<!-- --> </a> <h3>Methods inherited from class java.util.<a href="../../../../java/util/HashMap.html" title="class in java.util">HashMap</a></h3> <code><a href="../../../../java/util/HashMap.html#clear--">clear</a>, <a href="../../../../java/util/HashMap.html#clone--">clone</a>, <a href="../../../../java/util/HashMap.html#compute-K-java.util.function.BiFunction-">compute</a>, <a href="../../../../java/util/HashMap.html#computeIfAbsent-K-java.util.function.Function-">computeIfAbsent</a>, <a href="../../../../java/util/HashMap.html#computeIfPresent-K-java.util.function.BiFunction-">computeIfPresent</a>, <a href="../../../../java/util/HashMap.html#containsKey-java.lang.Object-">containsKey</a>, <a href="../../../../java/util/HashMap.html#containsValue-java.lang.Object-">containsValue</a>, <a href="../../../../java/util/HashMap.html#entrySet--">entrySet</a>, <a href="../../../../java/util/HashMap.html#forEach-java.util.function.BiConsumer-">forEach</a>, <a href="../../../../java/util/HashMap.html#get-java.lang.Object-">get</a>, <a href="../../../../java/util/HashMap.html#getOrDefault-java.lang.Object-V-">getOrDefault</a>, <a href="../../../../java/util/HashMap.html#isEmpty--">isEmpty</a>, <a href="../../../../java/util/HashMap.html#keySet--">keySet</a>, <a href="../../../../java/util/HashMap.html#merge-K-V-java.util.function.BiFunction-">merge</a>, <a href="../../../../java/util/HashMap.html#putAll-java.util.Map-">putAll</a>, <a href="../../../../java/util/HashMap.html#putIfAbsent-K-V-">putIfAbsent</a>, <a href="../../../../java/util/HashMap.html#remove-java.lang.Object-">remove</a>, <a href="../../../../java/util/HashMap.html#remove-java.lang.Object-java.lang.Object-">remove</a>, <a href="../../../../java/util/HashMap.html#replace-K-V-">replace</a>, <a href="../../../../java/util/HashMap.html#replace-K-V-V-">replace</a>, <a href="../../../../java/util/HashMap.html#replaceAll-java.util.function.BiFunction-">replaceAll</a>, <a href="../../../../java/util/HashMap.html#size--">size</a>, <a href="../../../../java/util/HashMap.html#values--">values</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.util.AbstractMap">
<!-- --> </a> <h3>Methods inherited from class java.util.<a href="../../../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a></h3> <code><a href="../../../../java/util/AbstractMap.html#equals-java.lang.Object-">equals</a>, <a href="../../../../java/util/AbstractMap.html#hashCode--">hashCode</a>, <a href="../../../../java/util/AbstractMap.html#toString--">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- --> </a> <h3>Methods inherited from class java.lang.<a href="../../../../java/lang/Object.html" title="class in java.lang">Object</a></h3> <code><a href="../../../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../../../java/lang/Object.html#notify--">notify</a>, <a href="../../../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../../../java/lang/Object.html#wait--">wait</a>, <a href="../../../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.util.Map">
<!-- --> </a> <h3>Methods inherited from interface java.util.<a href="../../../../java/util/Map.html" title="interface in java.util">Map</a></h3> <code><a href="../../../../java/util/Map.html#equals-java.lang.Object-">equals</a>, <a href="../../../../java/util/Map.html#hashCode--">hashCode</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- --> </a> <h3>构造方法详细信息</h3> <a name="PrinterStateReasons--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>PrinterStateReasons</h4> <pre>public PrinterStateReasons()</pre>
<div class="block">
<span>构造一个新的,空的打印机状态原因属性;</span>
<span>底层哈希映射具有默认的初始容量和负载因子。</span>
</div> </li>
</ul> <a name="PrinterStateReasons-int-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>PrinterStateReasons</h4> <pre>public PrinterStateReasons(int initialCapacity)</pre>
<div class="block">
<span>超级新的,空的打印机状态原因属性;</span>
<span>底层哈希映射具有给定的初始容量和默认负载因子。</span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>initialCapacity</code> - 初始容量。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果初始容量小于零。
</dd>
</dl> </li>
</ul> <a name="PrinterStateReasons-int-float-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>PrinterStateReasons</h4> <pre>public PrinterStateReasons(int initialCapacity,
float loadFactor)</pre>
<div class="block">
<span>构造一个新的,空的打印机状态原因属性;</span>
<span>底层哈希映射具有给定的初始容量和负载因子。</span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>initialCapacity</code> - 初始容量。
</dd>
<dd>
<code>loadFactor</code> - 负载系数。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果初始容量小于零。
</dd>
</dl> </li>
</ul> <a name="PrinterStateReasons-java.util.Map-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>PrinterStateReasons</h4> <pre>public PrinterStateReasons(<a href="../../../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>,<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a>&gt; map)</pre>
<div class="block">
<span>构造一个新的打印机状态原因属性,其中包含与给定地图相同的<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a><a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>映射。</span>
<span>底层哈希映射的初始容量和负载因子在超类<a href="../../../../java/util/HashMap.html#HashMap-java.util.Map-">构造</a>函数<code>HashMap(Map)</code><a href="../../../../java/util/HashMap.html#HashMap-java.util.Map-">指定</a></span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>map</code> - 地图复制。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - (未经检查的异常)如果摔出
<code>map</code>为null或者在任意键或值
<code>map</code>为空。
</dd>
<dd>
<span><code><a href="../../../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - (未经检查的异常)如果<code>map</code>中的任何键不是<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>类的实例,或者<code>map</code>中的任何值不是<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>类的实例,则<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类">抛出</a></span>
</dd>
</dl> </li>
</ul> </li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="put-javax.print.attribute.standard.PrinterStateReason-javax.print.attribute.standard.Severity-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>put</h4> <pre>public <a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a> put(<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a> reason,
<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a> severity)</pre>
<div class="block">
<span>将给定的打印机状态原因添加到此打印机状态原因属性,将其与给定的严重性级别相关联。</span>
<span>如果此打印机状态原因属性先前包含给定打印机状态原因的映射,则替换旧值。</span>
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">Specified by:</span>
</dt>
<dd>
<code><a href="../../../../java/util/Map.html#put-K-V-">put</a></code>在界面
<code><a href="../../../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>,<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a>&gt;</code>
</dd>
<dt>
<span class="overrideSpecifyLabel">重写:</span>
</dt>
<dd>
<code><a href="../../../../java/util/HashMap.html#put-K-V-">put</a></code>
<code><a href="../../../../java/util/HashMap.html" title="class in java.util">HashMap</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>,<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a>&gt;</code>
</dd>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<span><code>reason</code> - 打印机状态原因。</span>
<span>这必须是<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>类的一个实例。</span>
</dd>
<dd>
<span><code>severity</code> - 打印机状态原因的严重性。</span>
<span>这必须是<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</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>reason</code>为空或
<code>severity</code>为空,则抛出。
</dd>
<dd>
<span><code><a href="../../../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - (未经检查的异常)如果<code>reason</code>不是<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>类的实例,或者如果<code>severity</code>不是<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>类的实例,则<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类">抛出</a></span>
</dd>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.5
</dd>
</dl> </li>
</ul> <a name="getCategory--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getCategory</h4> <pre>public final <a href="../../../../java/lang/Class.html" title="class in java.lang"></a>&lt;? extends <a href="../../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a>&gt; getCategory()</pre>
<div class="block">
<span>获取要用作此打印属性值的“类别”的打印属性类。</span>
<p> <span>对于PrinterStateReasons类该类别是PrinterStateReasons类本身。</span> </p>
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">Specified by:</span>
</dt>
<dd>
<code><a href="../../../../javax/print/attribute/Attribute.html#getCategory--">getCategory</a></code>在界面
<code><a href="../../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a></code>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<span>打印属性类category类为<a href="../../../../java/lang/Class.html" title="java.lang中的类"><code>java.lang.Class</code></a>一个实例。</span>
</dd>
</dl> </li>
</ul> <a name="getName--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getName</h4> <pre>public final <a href="../../../../java/lang/String.html" title="class in java.lang">String</a> getName()</pre>
<div class="block">
<span>获取此属性值是一个实例的类别的名称。</span>
<p> <span>对于PrinterStateReasons类类别名称为<code>"printer-state-reasons"</code></span> </p>
</div>
<dl>
<dt>
<span class="overrideSpecifyLabel">Specified by:</span>
</dt>
<dd>
<code><a href="../../../../javax/print/attribute/Attribute.html#getName--">getName</a></code>在接口
<code><a href="../../../../javax/print/attribute/Attribute.html" title="interface in javax.print.attribute">Attribute</a></code>
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
属性类别名称。
</dd>
</dl> </li>
</ul> <a name="printerStateReasonSet-javax.print.attribute.standard.Severity-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>printerStateReasonSet</h4> <pre>public <a href="../../../../java/util/Set.html" title="interface in java.util">Set</a>&lt;<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="class in javax.print.attribute.standard">PrinterStateReason</a>&gt; printerStateReasonSet(<a href="../../../../javax/print/attribute/standard/Severity.html" title="class in javax.print.attribute.standard">Severity</a> severity)</pre>
<div class="block">
<span>在此PrinterStateReasons属性中以给定的严重级别获取不可修改的打印机状态原因属性的集合视图。</span>
<span>集合视图中的每个元素都是一个<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象。</span>
<span>集合视图中唯一的元素是映射到给定严重性值的<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>对象。</span>
<span>该设置视图由此PrinterStateReasons属性支持因此对此PrinterStateReasons属性的更改反映在设置视图中。</span>
<span>设置视图不支持元素插入或删除。</span>
<span>设置视图的迭代器不支持元素删除。</span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>severity</code> - 严重程度。
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<span>在给定的<a href="../../../../javax/print/attribute/standard/Severity.html" title="javax.print.attribute.standard中的类"><code>Severity</code></a>级别设置个人<a href="../../../../javax/print/attribute/standard/PrinterStateReason.html" title="javax.print.attribute.standard中的类"><code>PrinterStateReason</code></a>属性的视图。</span>
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - (未选中的异常)如果
<code>severity</code>为空,则抛出。
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>