Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## modhelxs.state_management
Class Value<T>

    java.lang.Object
      modhelxs.state_management.Value<T>

Direct Known Subclasses:
  Attribute, Parameter

    public abstract class Value<T>

extends java.lang.Object

A place for storing a value of type T.

Field Summary
`private boolean` | `giveInitWarning_` Give a warning is the Value is not initialized.
`private java.lang.Class<T>` | `type_` The type of the stored value.
`private T` | `value_` The stored value.

Constructor Summary
`Value(java.lang.Class<T> type)` Create a new storage of type `type`.
`Value(java.lang.Class<T> type, boolean giveInitWarning)` Create a new storage of type `type`.

Method Summary
`java.lang.Class<T>` | `getType()` Get the type of this storage.
`T` | `getValue()` Get the value stored in this storage.
`void` | `init(T value)` Set the initial value of this storage.
`void` | `initFromProperty(NamedEntity entity, java.lang.String propName)` Set the initial value of this storage from a property of a NamedEntity.
`protected void` | `setValue(T value)` Set the value stored in this storage.
`protected void` | `setValue(Value<T> value)` Set the value stored in this storage.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### type_

    private java.lang.Class<T> type_

  The type of the stored value.

### value_

    private T value_

  The stored value.

### giveInitWarning_

    private boolean giveInitWarning_

  Give a warning is the Value is not initialized.

Constructor Detail

### Value

    public Value(java.lang.Class<T> type,
                 boolean giveInitWarning)

  Create a new storage of type `type`.

### Value

    public Value(java.lang.Class<T> type)

  Create a new storage of type `type`.

Method Detail

### getType

    public java.lang.Class<T> getType()

  Get the type of this storage.

### getValue

    public T getValue()

  Get the value stored in this storage.

### setValue

    protected void setValue(T value)

  Set the value stored in this storage. Protected because some storages may be read-only.

### setValue

    protected void setValue(Value<T> value)

  Set the value stored in this storage. Protected because some storages may be read-only.

### init

    public void init(T value)

  Set the initial value of this storage.

### initFromProperty

    public void initFromProperty(NamedEntity entity,
                                 java.lang.String propName)

  Set the initial value of this storage from a property of a NamedEntity.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD