JBoss Modular Service Kernel API 1.0.0.CR2

org.jboss.msc.value
Class MapItemValue<T>

java.lang.Object
  extended by org.jboss.msc.value.MapItemValue<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Value<T>

public final class MapItemValue<T>
extends Object
implements Value<T>

A value which is acquired from a map by key.

Author:
David M. Lloyd

Constructor Summary
MapItemValue(Value<?> keyValue, Value<? extends Map<?,? extends T>> mapValue)
          Construct a new instance.
 
Method Summary
 T getValue()
          Get the actual value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapItemValue

public MapItemValue(Value<?> keyValue,
                    Value<? extends Map<?,? extends T>> mapValue)
Construct a new instance.

Parameters:
keyValue - the map key
mapValue - the map to look into
Method Detail

getValue

public T getValue()
           throws IllegalStateException
Get the actual value.

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

JBoss Modular Service Kernel API 1.0.0.CR2

Copyright © 2011 JBoss, a division of Red Hat, Inc.