mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-07-04 15:52:45 +08:00
666 lines
34 KiB
HTML
666 lines
34 KiB
HTML
<div class="header">
|
||
<div class="subTitle">
|
||
compact1, compact2, compact3
|
||
</div>
|
||
<div class="subTitle">
|
||
javax.script
|
||
</div>
|
||
<h2 class="title" title="Class SimpleBindings">Class SimpleBindings</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>javax.script.SimpleBindings</li>
|
||
</ul> </li>
|
||
</ul>
|
||
<div class="description">
|
||
<ul class="blockList">
|
||
<li class="blockList">
|
||
<dl>
|
||
<dt>
|
||
All Implemented Interfaces:
|
||
</dt>
|
||
<dd>
|
||
<span><a href="../../java/util/Map.html" title="java.util中的接口">Map</a> < <a href="../../java/lang/String.html" title="java.lang中的类">String</a> , <a href="../../java/lang/Object.html" title="java.lang中的类">Object</a> >, <a href="../../javax/script/Bindings.html" title="javax.script中的接口">Bindings</a></span>
|
||
</dd>
|
||
</dl>
|
||
<hr/> <br/> <pre>public class <span class="typeNameLabel">SimpleBindings</span>
|
||
extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a>
|
||
implements <a href="../../javax/script/Bindings.html" title="interface in javax.script">Bindings</a></pre>
|
||
<div class="block">
|
||
一个简单的实现,由
|
||
<code>HashMap</code>或其他一些指定的
|
||
<code>Map</code> 。
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="simpleTagLabel">从以下版本开始:</span>
|
||
</dt>
|
||
<dd>
|
||
1.6
|
||
</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.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><<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>></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/script/SimpleBindings.html#SimpleBindings--">SimpleBindings</a></span>()</code>
|
||
<div class="block">
|
||
默认构造函数使用
|
||
<code>HashMap</code> 。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="rowColor">
|
||
<td class="colOne"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#SimpleBindings-java.util.Map-">SimpleBindings</a></span>(<a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>> m)</code>
|
||
<div class="block">
|
||
构造函数使用现有的
|
||
<code>Map</code>来存储值。
|
||
</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>void</code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#clear--">clear</a></span>()</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/script/SimpleBindings.html#containsKey-java.lang.Object-">containsKey</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> key)</code>
|
||
<div class="block">
|
||
如果此映射包含指定键的映射,则返回
|
||
<tt>true</tt> 。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="altColor" id="i2">
|
||
<td class="colFirst"><code>boolean</code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#containsValue-java.lang.Object-">containsValue</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> value)</code>
|
||
<div class="block">
|
||
如果此地图将一个或多个键映射到指定的值,则返回
|
||
<tt>true</tt> 。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="rowColor" id="i3">
|
||
<td class="colFirst"><code><a href="../../java/util/Set.html" title="interface in java.util">Set</a><<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>>></code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#entrySet--">entrySet</a></span>()</code>
|
||
<div class="block">
|
||
<span>返回此地图中包含的映射的<a href="../../java/util/Set.html" title="java.util中的接口"><code>Set</code></a>视图。</span>
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="altColor" id="i4">
|
||
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#get-java.lang.Object-">get</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> key)</code>
|
||
<div class="block">
|
||
返回此映射映射指定键的值。
|
||
</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/script/SimpleBindings.html#isEmpty--">isEmpty</a></span>()</code>
|
||
<div class="block">
|
||
如果此地图不包含键值映射,则返回
|
||
<tt>true</tt> 。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="altColor" id="i6">
|
||
<td class="colFirst"><code><a href="../../java/util/Set.html" title="interface in java.util">Set</a><<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/script/SimpleBindings.html#keySet--">keySet</a></span>()</code>
|
||
<div class="block">
|
||
<span>返回此地图中包含的键的<a href="../../java/util/Set.html" title="java.util中的接口"><code>Set</code></a>视图。</span>
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="rowColor" id="i7">
|
||
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#put-java.lang.String-java.lang.Object-">put</a></span>(<a href="../../java/lang/String.html" title="class in java.lang">String</a> name, <a href="../../java/lang/Object.html" title="class in java.lang">Object</a> value)</code>
|
||
<div class="block">
|
||
设置底层
|
||
<code>map</code>字段中指定的键/值。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="altColor" id="i8">
|
||
<td class="colFirst"><code>void</code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#putAll-java.util.Map-">putAll</a></span>(<a href="../../java/util/Map.html" title="interface in java.util">Map</a><? extends <a href="../../java/lang/String.html" title="class in java.lang">String</a>,? extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a>> toMerge)</code>
|
||
<div class="block">
|
||
<code>putAll</code>使用实施
|
||
<code>Map.putAll</code> 。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="rowColor" id="i9">
|
||
<td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#remove-java.lang.Object-">remove</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> key)</code>
|
||
<div class="block">
|
||
如果存在该地图,则从该地图中删除该密钥的映射(可选操作)。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="altColor" id="i10">
|
||
<td class="colFirst"><code>int</code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#size--">size</a></span>()</code>
|
||
<div class="block">
|
||
返回此地图中键值映射的数量。
|
||
</div> </td>
|
||
</tr>
|
||
<tr class="rowColor" id="i11">
|
||
<td class="colFirst"><code><a href="../../java/util/Collection.html" title="interface in java.util">Collection</a><<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code></td>
|
||
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/script/SimpleBindings.html#values--">values</a></span>()</code>
|
||
<div class="block">
|
||
<span>返回此地图中包含的值的<a href="../../java/util/Collection.html" title="java.util中的接口"><code>Collection</code></a>视图。</span>
|
||
</div> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<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#clone--">clone</a>, <a href="../../java/lang/Object.html#equals-java.lang.Object-">equals</a>, <a href="../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../java/lang/Object.html#hashCode--">hashCode</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#toString--">toString</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#compute-K-java.util.function.BiFunction-">compute</a>, <a href="../../java/util/Map.html#computeIfAbsent-K-java.util.function.Function-">computeIfAbsent</a>, <a href="../../java/util/Map.html#computeIfPresent-K-java.util.function.BiFunction-">computeIfPresent</a>, <a href="../../java/util/Map.html#equals-java.lang.Object-">equals</a>, <a href="../../java/util/Map.html#forEach-java.util.function.BiConsumer-">forEach</a>, <a href="../../java/util/Map.html#getOrDefault-java.lang.Object-V-">getOrDefault</a>, <a href="../../java/util/Map.html#hashCode--">hashCode</a>, <a href="../../java/util/Map.html#merge-K-V-java.util.function.BiFunction-">merge</a>, <a href="../../java/util/Map.html#putIfAbsent-K-V-">putIfAbsent</a>, <a href="../../java/util/Map.html#remove-java.lang.Object-java.lang.Object-">remove</a>, <a href="../../java/util/Map.html#replace-K-V-">replace</a>, <a href="../../java/util/Map.html#replace-K-V-V-">replace</a>, <a href="../../java/util/Map.html#replaceAll-java.util.function.BiFunction-">replaceAll</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="SimpleBindings-java.util.Map-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>SimpleBindings</h4> <pre>public SimpleBindings(<a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>> m)</pre>
|
||
<div class="block">
|
||
构造函数使用现有的
|
||
<code>Map</code>存储值。
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>m</code> -
|
||
<code>Map</code>支持这个
|
||
<code>SimpleBindings</code> 。
|
||
</dd>
|
||
<dt>
|
||
<span class="throwsLabel">异常</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - 如果m为空
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="SimpleBindings--">
|
||
<!-- --> </a>
|
||
<ul class="blockListLast">
|
||
<li class="blockList"> <h4>SimpleBindings</h4> <pre>public SimpleBindings()</pre>
|
||
<div class="block">
|
||
默认构造函数使用
|
||
<code>HashMap</code> 。
|
||
</div> </li>
|
||
</ul> </li>
|
||
</ul>
|
||
<!-- ============ METHOD DETAIL ========== -->
|
||
<ul class="blockList">
|
||
<li class="blockList"><a name="method.detail">
|
||
<!-- --> </a> <h3>方法详细信息</h3> <a name="put-java.lang.String-java.lang.Object-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>put</h4> <pre>public <a href="../../java/lang/Object.html" title="class in java.lang">Object</a> put(<a href="../../java/lang/String.html" title="class in java.lang">String</a> name,
|
||
<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> value)</pre>
|
||
<div class="block">
|
||
设置底层
|
||
<code>map</code>字段中指定的键/值。
|
||
</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><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../javax/script/Bindings.html#put-java.lang.String-java.lang.Object-">put</a></code>在界面
|
||
<code><a href="../../javax/script/Bindings.html" title="interface in javax.script">Bindings</a></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>name</code> - 价值名称
|
||
</dd>
|
||
<dd>
|
||
<code>value</code> - 要设置的值。
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
<span>指定键的上一个值。</span>
|
||
<span>如果键以前未设置,则返回null。</span>
|
||
</dd>
|
||
<dt>
|
||
<span class="throwsLabel">异常</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - 如果名称为空。
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果名称为空。
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="putAll-java.util.Map-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>putAll</h4> <pre>public void putAll(<a href="../../java/util/Map.html" title="interface in java.util">Map</a><? extends <a href="../../java/lang/String.html" title="class in java.lang">String</a>,? extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a>> toMerge)</pre>
|
||
<div class="block">
|
||
<code>putAll</code>使用实施
|
||
<code>Map.putAll</code> 。
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#putAll-java.util.Map-">putAll</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../javax/script/Bindings.html#putAll-java.util.Map-">putAll</a></code>在界面
|
||
<code><a href="../../javax/script/Bindings.html" title="interface in javax.script">Bindings</a></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>toMerge</code> - 要添加的值的
|
||
<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> - 如果toMerge映射为空,或者映射中的某些键为空。
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果地图中的某些键为空字符串。
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="clear--">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>clear</h4> <pre>public void clear()</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#clear--">clear</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="containsKey-java.lang.Object-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>containsKey</h4> <pre>public boolean containsKey(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> key)</pre>
|
||
<div class="block">
|
||
<span>如果此映射包含指定键的映射,则返回<tt>true</tt> 。</span>
|
||
<span>更正式地,返回<tt>true</tt>当且仅当此映射包含一个键<tt>k</tt>的映射,使<tt>(key==null ? k==null : key.equals(k))</tt> 。</span>
|
||
<span>(最多可以有一个这样的映射。)</span>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#containsKey-java.lang.Object-">containsKey</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../javax/script/Bindings.html#containsKey-java.lang.Object-">containsKey</a></code>在界面
|
||
<code><a href="../../javax/script/Bindings.html" title="interface in javax.script">Bindings</a></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>key</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> - 如果键为空
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - 如果键不是字符串
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果键为空字符串
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="containsValue-java.lang.Object-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>containsValue</h4> <pre>public boolean containsValue(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> value)</pre>
|
||
<div class="block">
|
||
<span>如果此映射将一个或多个键映射到指定值,则返回<tt>true</tt> 。</span>
|
||
<span>更正式地,返回<tt>true</tt>当且仅当此映射包含至少一个映射到值<tt>v</tt> ,以便<tt>(value==null ? v==null : value.equals(v))</tt> 。</span>
|
||
<span>对于Map接口的大多数实现,此<tt>操作</tt>对于地图大小可能需要时间线性。</span>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#containsValue-java.lang.Object-">containsValue</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>value</code> - 要在此地图中存在的值要进行测试
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
<tt>true</tt>如果该地图将一个或多个键映射到指定的值
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="entrySet--">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>entrySet</h4> <pre>public <a href="../../java/util/Set.html" title="interface in java.util">Set</a><<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>>> entrySet()</pre>
|
||
<div class="block">
|
||
<span>返回此地图中包含的映射的<a href="../../java/util/Set.html" title="java.util中的接口"><code>Set</code></a>视图。</span>
|
||
<span>该集合由地图支持,因此对地图的更改将反映在集合中,反之亦然。</span>
|
||
<span>如果在集合中的迭代正在进行时修改映射(除了通过迭代器自己的<tt>remove</tt>操作,或者通过迭代器返回的映射条目上的<tt>setValue</tt>操作),迭代的结果是未定义的。</span>
|
||
<span>该组支持元件移除,即从映射中相应的映射,经由<tt><tt><tt><tt>Iterator.remove,Set.remove,removeAll,retainAll</tt></tt></tt></tt>和<tt>clear</tt>操作。</span>
|
||
<span>它不支持<tt>add</tt>或<tt>addAll</tt>操作。</span>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#entrySet--">entrySet</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
该地图中包含的映射的集合视图
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="get-java.lang.Object-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>get</h4> <pre>public <a href="../../java/lang/Object.html" title="class in java.lang">Object</a> get(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> key)</pre>
|
||
<div class="block">
|
||
<span>返回此映射映射指定键的值。</span>
|
||
<span>如果地图不包含此键的映射,则返回<tt>null</tt> 。</span>
|
||
<span>的<tt>null</tt>返回值并不<i>一定</i>表明该映射不包含该键的映射关系;</span>
|
||
<span>地图也可能明确地将密钥映射到<tt>null</tt> 。</span>
|
||
<span><tt>containsKey</tt>操作可用于区分这两种情况。</span>
|
||
<p> <span>更正式地,如果该地图包含从一个键<tt>k</tt>到一个值<tt>v的映射</tt> ,使得<tt>(key==null ? k==null : key.equals(k))</tt> ,则此方法返回<tt>v</tt> ;</span> <span>否则返回<tt>null</tt> 。</span> <span>(最多可以有一个这样的映射。)</span> </p>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#get-java.lang.Object-">get</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../javax/script/Bindings.html#get-java.lang.Object-">get</a></code>在界面
|
||
<code><a href="../../javax/script/Bindings.html" title="interface in javax.script">Bindings</a></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>key</code> - 要返回其关联值的键。
|
||
</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> - 如果键为空
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - 如果键不是字符串
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果键为空字符串
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="isEmpty--">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>isEmpty</h4> <pre>public boolean isEmpty()</pre>
|
||
<div class="block">
|
||
如果此地图不包含键值映射,则返回
|
||
<tt>true</tt> 。
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#isEmpty--">isEmpty</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
<tt>true</tt>如果该地图不包含键值映射
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="keySet--">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>keySet</h4> <pre>public <a href="../../java/util/Set.html" title="interface in java.util">Set</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>> keySet()</pre>
|
||
<div class="block">
|
||
<span>返回此地图中包含的键的<a href="../../java/util/Set.html" title="java.util中的接口"><code>Set</code></a>视图。</span>
|
||
<span>该集合由地图支持,因此对地图的更改将反映在集合中,反之亦然。</span>
|
||
<span>如果在集合中的迭代正在进行中修改映射(除了通过迭代器自己的<tt>remove</tt>操作),迭代的结果是未定义的。</span>
|
||
<span>该组支持元件移除,即从映射中相应的映射,经由<tt><tt><tt><tt>Iterator.remove,Set.remove,removeAll,retainAll</tt></tt></tt></tt>和<tt>clear</tt>操作。</span>
|
||
<span>它不支持<tt>add</tt>或<tt>addAll</tt>操作。</span>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#keySet--">keySet</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
该地图中包含的键的集合视图
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="remove-java.lang.Object-">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>remove</h4> <pre>public <a href="../../java/lang/Object.html" title="class in java.lang">Object</a> remove(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a> key)</pre>
|
||
<div class="block">
|
||
<span>如果存在该地图,则从该地图中删除该密钥的映射(可选操作)。</span>
|
||
<span>更正式地,如果该映射包含从键<tt>k</tt>到值<tt>v的</tt>映射,使得<code>(key==null ? k==null : key.equals(k))</code> ,该映射被去除。</span>
|
||
<span>(地图最多可以包含一个这样的映射。)</span>
|
||
<p> <span>返回到该图先前相关联的密钥,或<tt>null</tt>如果映射包含了一个该键的映射关系的值。</span> <span>(A <tt>null</tt>回报也表明,如果实现支持<tt>null个</tt>值映射以前关联<tt>null</tt>与指定键)的地图将不包含一旦调用返回指定键的映射。</span> </p>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#remove-java.lang.Object-">remove</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../javax/script/Bindings.html#remove-java.lang.Object-">remove</a></code>在界面
|
||
<code><a href="../../javax/script/Bindings.html" title="interface in javax.script">Bindings</a></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="paramLabel">参数</span>
|
||
</dt>
|
||
<dd>
|
||
<code>key</code> - 其映射将从地图中删除的密钥。
|
||
</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> - 如果键为空
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - 如果键不是字符串
|
||
</dd>
|
||
<dd>
|
||
<code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - 如果键为空字符串
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="size--">
|
||
<!-- --> </a>
|
||
<ul class="blockList">
|
||
<li class="blockList"> <h4>size</h4> <pre>public 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="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#size--">size</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
该地图中键值映射的数量
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> <a name="values--">
|
||
<!-- --> </a>
|
||
<ul class="blockListLast">
|
||
<li class="blockList"> <h4>values</h4> <pre>public <a href="../../java/util/Collection.html" title="interface in java.util">Collection</a><<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>> values()</pre>
|
||
<div class="block">
|
||
<span>返回此地图中包含的值的<a href="../../java/util/Collection.html" title="java.util中的接口"><code>Collection</code></a>视图。</span>
|
||
<span>集合由地图支持,因此对地图的更改将反映在集合中,反之亦然。</span>
|
||
<span>如果在集合中的迭代正在进行中修改映射(除了通过迭代器自己的<tt>remove</tt>操作),迭代的结果是未定义的。</span>
|
||
<span>该collection支持元素移除,即从映射中相应的映射,经由<tt><tt><tt><tt>Iterator.remove,Collection.remove,removeAll,retainAll</tt></tt></tt></tt>和<tt>clear</tt>操作。</span>
|
||
<span>它不支持<tt>add</tt>或<tt>addAll</tt>操作。</span>
|
||
</div>
|
||
<dl>
|
||
<dt>
|
||
<span class="overrideSpecifyLabel">Specified by:</span>
|
||
</dt>
|
||
<dd>
|
||
<code><a href="../../java/util/Map.html#values--">values</a></code>在界面
|
||
<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a><<a href="../../java/lang/String.html" title="class in java.lang">String</a>,<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>></code>
|
||
</dd>
|
||
<dt>
|
||
<span class="returnLabel">结果</span>
|
||
</dt>
|
||
<dd>
|
||
该地图中包含的值的集合视图
|
||
</dd>
|
||
</dl> </li>
|
||
</ul> </li>
|
||
</ul> </li>
|
||
</ul>
|
||
</div>
|
||
</div> |