Class Value.ValueImpl<W extends World<W>,​V>

java.lang.Object
org.jmanikin.core.Value.ValueImpl<W,​V>
Type Parameters:
W - the World type
V - the Value type
All Implemented Interfaces:
Value<W,​V>, World<W>
Enclosing interface:
Value<W extends World<W>,​V>

public static final class Value.ValueImpl<W extends World<W>,​V>
extends java.lang.Object
implements Value<W,​V>

Default implementation.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.jmanikin.core.Value

    Value.ValueImpl<W extends World<W>,​V>
  • Constructor Summary

    Constructors
    Constructor Description
    ValueImpl​(W w, V v)  
  • Method Summary

    Modifier and Type Method Description
    W init()
    Returns a pristine new World of type W
    <O> Value<W,​O> obj​(Id<? extends O> id)
    Returns the current Object O value, given an id.
    <O> Value<W,​O> old​(Id<? extends O> id)
    Returns the old Object O value, given an id.
    <I extends Id<O>,​ O,​ E>
    Value<W,​E>
    send​(I id, Message<I,​O,​E> msg)
    Returns the effect Value E, after sending a Message to Object O, given an Object identifier.
    V value()  
    W world()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ValueImpl

      public ValueImpl​(W w, V v)
  • Method Details

    • world

      public W world()
      Specified by:
      world in interface Value<W extends World<W>,​V>
    • value

      public V value()
      Specified by:
      value in interface Value<W extends World<W>,​V>
    • init

      public W init()
      Description copied from interface: World
      Returns a pristine new World of type W
      Specified by:
      init in interface World<W extends World<W>>
      Returns:
      a pristine new World
    • obj

      public <O> Value<W,​O> obj​(Id<? extends O> id)
      Description copied from interface: World
      Returns the current Object O value, given an id.
      Specified by:
      obj in interface World<W extends World<W>>
      Type Parameters:
      O - the Object type
      Parameters:
      id - the Object Id
      Returns:
      the current Object O, wrapped in a Value
    • old

      public <O> Value<W,​O> old​(Id<? extends O> id)
      Description copied from interface: World
      Returns the old Object O value, given an id.
      Specified by:
      old in interface World<W extends World<W>>
      Type Parameters:
      O - the Object type
      Parameters:
      id - the Object Id
      Returns:
      the current Object O, wrapped in a Value
    • send

      public <I extends Id<O>,​ O,​ E> Value<W,​E> send​(I id, Message<I,​O,​E> msg)
      Description copied from interface: World
      Returns the effect Value E, after sending a Message to Object O, given an Object identifier.
      Specified by:
      send in interface World<W extends World<W>>
      Type Parameters:
      I - the Id Type
      O - the Object Type
      E - the Effect Type
      Parameters:
      id - the Object identifier to send the Message to
      msg - the message to send to the Object
      Returns:
      the effect of the Message send, wrapped in a Value