Class 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 java.lang.Object
    implements Value<MapEntry<K,​V>>
    A value which yields a map entry.
    • 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 java.lang.IllegalStateException
        Get the actual value.
        Specified by:
        getValue in interface Value<K>
        Returns:
        the actual value
        Throws:
        java.lang.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