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

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

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

A value which is acquired from a list by numerical index.

Author:
David M. Lloyd

Constructor Summary
ListItemValue(Value<List<? extends T>> listValue, Value<? extends Number> indexValue)
          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

ListItemValue

public ListItemValue(Value<List<? extends T>> listValue,
                     Value<? extends Number> indexValue)
Construct a new instance.

Parameters:
listValue - the list in which to look
indexValue - the index at which to look
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.


Copyright © 2011. All Rights Reserved.