Top Constructors Methods
org.eclipse.jetty.util

public Class HostMap<TYPE>

extends HashMap<String, TYPE>
Class Inheritance
Annotations
@SuppressWarnings:serial
Type Parameters
<TYPE>
the element type
Imports
java.util.HashMap, .HashSet, .Map

Constructor Summary

AccessConstructor and Description
public
HostMap()

Construct empty HostMap.

public
HostMap(int
initial capacity
capacity
)

Construct empty HostMap.

Method Summary

Modifier and TypeMethod and Description
public TYPE
get(Object
the key whose associated value is to be returned
key
)

Overrides java.util.HashMap.get.

Implements java.util.Map.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

public Object

Returns:

lazy list of map entries
getLazyMatches
(String
hostname
host
)

Retrieve a lazy list of map entries associated with specified hostname by taking into account the domain suffix matches.

public TYPE
put(String
key with which the specified value is to be associated
host
,
TYPE
value to be associated with the specified key
object
)

Overrides java.util.HashMap.put.

Implements java.util.Map.put.

Associates the specified value with the specified key in this map.

Inherited from java.util.HashMap:
clearclonecomputecomputeIfAbsentcomputeIfPresentcontainsKeycontainsValueentrySetforEachgetOrDefaultisEmptykeySetmergenewHashMapputAllputIfAbsentremoveremovereplacereplacereplaceAllsizevalues

Constructor Detail

HostMapback to summary
public HostMap()

Construct empty HostMap.

HostMapback to summary
public HostMap(int capacity)

Construct empty HostMap.

Parameters
capacity:int

initial capacity

Method Detail

getback to summary
public TYPE get(Object key)

Overrides java.util.HashMap.get.

Implements java.util.Map.get.

Doc from java.util.HashMap.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

More formally, if this map contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

Parameters
key:Object

Doc from java.util.Map.get.

the key whose associated value is to be returned

Returns:TYPE

Doc from java.util.Map.get.

the value to which the specified key is mapped, or null if this map contains no mapping for the key

Annotations
@Override
getLazyMatchesback to summary
public Object getLazyMatches(String host)

Retrieve a lazy list of map entries associated with specified hostname by taking into account the domain suffix matches.

Parameters
host:String

hostname

Returns:Object

lazy list of map entries

putback to summary
public TYPE put(String host, TYPE object) throws IllegalArgumentException

Overrides java.util.HashMap.put.

Implements java.util.Map.put.

Doc from java.util.HashMap.put.

Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.

Parameters
host:String

key with which the specified value is to be associated

object:TYPE

value to be associated with the specified key

Returns:TYPE

the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)

Annotations
@Override
Exceptions
IllegalArgumentException:

Doc from java.util.Map.put.

if some property of the specified key or value prevents it from being stored in this map