org.jboss.msc.value
Class MapEntryValue<K,V>

java.lang.Object
  extended by org.jboss.msc.value.MapEntryValue<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Value<MapEntry<K,V>>

public final class MapEntryValue<K,V>
extends Object
implements Value<MapEntry<K,V>>

A value which yields a map entry.

Author:
David M. Lloyd

Constructor Summary
MapEntryValue(MapEntry<Value<K>,Value<V>> entry)
          Construct a new instance.
 
Method Summary
 MapEntry<K,V> getValue()
          Get the actual value.
static
<K,V> Value<MapEntry<K,V>>
of(Value<K> key, Value<V> value)
          Construct a new instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapEntryValue

public MapEntryValue(MapEntry<Value<K>,Value<V>> entry)
Construct a new instance.

Parameters:
entry - the key and value to use
Method Detail

getValue

public MapEntry<K,V> getValue()
                       throws IllegalStateException
Get the actual value.

Specified by:
getValue in interface Value<MapEntry<K,V>>
Returns:
the actual value
Throws:
IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.

of

public static <K,V> Value<MapEntry<K,V>> of(Value<K> key,
                                            Value<V> value)
Construct a new instance.

Type Parameters:
K - the key type
V - the value type
Parameters:
key - the key
value - the value
Returns:
the new entry value


Copyright © 2011. All Rights Reserved.