org.eclipse.jetty.util
类 IPAddressMap<TYPE>

java.lang.Object
  继承者 java.util.AbstractMap<K,V>
      继承者 java.util.HashMap<String,TYPE>
          继承者 org.eclipse.jetty.util.IPAddressMap<TYPE>
所有已实现的接口:
Serializable, Cloneable, Map<String,TYPE>

public class IPAddressMap<TYPE>
extends HashMap<String,TYPE>

Internet address map to object

Internet addresses may be specified as absolute address or as a combination of four octet wildcard specifications (a.b.c.d) that are defined as follows.

 nnn - an absolute value (0-255)
 mmm-nnn - an inclusive range of absolute values, 
           with following shorthand notations:
           nnn- => nnn-255
           -nnn => 0-nnn
           -    => 0-255
 a,b,... - a list of wildcard specifications
 

另请参见:
序列化表格

嵌套类摘要
 
从类 java.util.AbstractMap 继承的嵌套类/接口
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
构造方法摘要
IPAddressMap()
          Construct empty IPAddressMap.
IPAddressMap(int capacity)
          Construct empty IPAddressMap.
 
方法摘要
 TYPE get(Object key)
          Retrieve the object mapped to the specified internet address literal
 Object getLazyMatches(String addr)
          Retrieve a lazy list of map entries associated with specified internet address by taking into account the wildcard specifications.
 Map.Entry<String,TYPE> getMatch(String addr)
          Retrieve the first map entry that is associated with the specified internet address by taking into account the wildcard specifications.
 TYPE match(String addr)
          Retrieve the first object that is associated with the specified internet address by taking into account the wildcard specifications.
 TYPE put(String addrSpec, TYPE object)
          Insert a new internet address into map
 
从类 java.util.HashMap 继承的方法
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
从类 java.util.AbstractMap 继承的方法
equals, hashCode, toString
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 java.util.Map 继承的方法
equals, hashCode
 

构造方法详细信息

IPAddressMap

public IPAddressMap()
Construct empty IPAddressMap.


IPAddressMap

public IPAddressMap(int capacity)
Construct empty IPAddressMap.

参数:
capacity - initial capacity
方法详细信息

put

public TYPE put(String addrSpec,
                TYPE object)
         throws IllegalArgumentException
Insert a new internet address into map

指定者:
接口 Map<String,TYPE> 中的 put
覆盖:
HashMap<String,TYPE> 中的 put
抛出:
IllegalArgumentException
另请参见:
HashMap.put(java.lang.Object, java.lang.Object)

get

public TYPE get(Object key)
Retrieve the object mapped to the specified internet address literal

指定者:
接口 Map<String,TYPE> 中的 get
覆盖:
HashMap<String,TYPE> 中的 get
另请参见:
HashMap.get(java.lang.Object)

match

public TYPE match(String addr)
Retrieve the first object that is associated with the specified internet address by taking into account the wildcard specifications.

参数:
addr - internet address
返回:
associated object

getMatch

public Map.Entry<String,TYPE> getMatch(String addr)
Retrieve the first map entry that is associated with the specified internet address by taking into account the wildcard specifications.

参数:
addr - internet address
返回:
map entry associated

getLazyMatches

public Object getLazyMatches(String addr)
Retrieve a lazy list of map entries associated with specified internet address by taking into account the wildcard specifications.

参数:
addr - internet address
返回:
lazy list of map entries


Copyright © 2013. All Rights Reserved.