Class ListItemValue<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    Value<T>

    public final class ListItemValue<T>
    extends java.lang.Object
    implements Value<T>
    A value which is acquired from a list by numerical index.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Value<? extends java.lang.Number> indexValue  
      private Value<? extends java.util.List<? extends T>> listValue  
    • Constructor Summary

      Constructors 
      Constructor Description
      ListItemValue​(Value<java.util.List<? extends T>> listValue, Value<? extends java.lang.Number> indexValue)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue()
      Get the actual value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • listValue

        private final Value<? extends java.util.List<? extends T>> listValue
      • indexValue

        private final Value<? extends java.lang.Number> indexValue
    • Constructor Detail

      • ListItemValue

        public ListItemValue​(Value<java.util.List<? extends T>> listValue,
                             Value<? extends java.lang.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 java.lang.IllegalStateException
        Get the actual value.
        Specified by:
        getValue in interface Value<T>
        Returns:
        the actual value
        Throws:
        java.lang.IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.