Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler.util

public final Class MultiHashtable<K, V>

extends Object
Class Inheritance
Imports
java.util.HashMap, .HashSet, .Map, .Set

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
private final Map<K, Set<V>>
private boolean
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
makeUnmodifiable()

Makes the MultiHashtable unmodifiable.

public V

Returns:

the item in the set if a match is found.
maps
(K
key with which the specified value is to be associated
key
,
V
value in a set that is associated with the specified key
value
)

Maps a key to a value in a set that is associated with the specified key.

public Set<V>

Returns:

the set that is associated with the specified key.
put
(K
key with which the specified value is to be associated
key
,
V
value to be added to a set that is associated with the specified key
value
)

Associates the specified key with a set of values.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mapback to summary
private final Map<K, Set<V>> map
modifiableback to summary
private boolean modifiable
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Constructor Detail

MultiHashtableback to summary
public MultiHashtable()

Method Detail

makeUnmodifiableback to summary
public void makeUnmodifiable()

Makes the MultiHashtable unmodifiable. This method allows modules to set the table as "read-only" so that only query operation, that is maps, is allowed. Any attempts to modify the returned map result in an UnsupportedOperationException.

mapsback to summary
public V maps(K key, V value)

Maps a key to a value in a set that is associated with the specified key. The mapping is performed by evaluating whether an item in the set equals the specified value.

Parameters
key:K

key with which the specified value is to be associated

value:V

value in a set that is associated with the specified key

Returns:V

the item in the set if a match is found.

putback to summary
public Set<V> put(K key, V value)

Associates the specified key with a set of values. If the map previously contained a mapping for the key, the value is added to the set.

Parameters
key:K

key with which the specified value is to be associated

value:V

value to be added to a set that is associated with the specified key

Returns:Set<V>

the set that is associated with the specified key.

Exceptions
UnsupportedOperationException:
is the MultiHashtable is not modifiable.