de.espirit.firstspirit.ui.gadgets.aspects
Interface ValueHolder<T>

Type Parameters:
T - The type of the value held by the implementor.
All Known Implementing Classes:
AbstractValueHoldingSwingGadget

public interface ValueHolder<T>

Aspect definition for a persistency object holder of a specified type of value. The parameterization of T must correspond to the concrete value type of a Gadget component.

The outer framework guarantees that none of this interface's methods gets invoked before the gadget's component was requested.

The AbstractValueHoldingSwingGadget provides an abstract implementation with supporting functionality and a small sub-type API. It is recommended, but not obligatory to sub-class the abstract implementation.

Since:
4.2.405
See Also:
AbstractValueHoldingSwingGadget

Field Summary
static AspectType<ValueHolder<?>> TYPE
          The aspect's generic type to access the value holding container in an unchecked way.
 
Method Summary
 T getValue()
          Get the current value stored by this value holder.
 boolean isEmpty()
          Indicates that the currently hold value is considered to represent an empty value.
 void setValue(T value)
          Set the given value to be stored by this value holder.
 

Field Detail

TYPE

static final AspectType<ValueHolder<?>> TYPE
The aspect's generic type to access the value holding container in an unchecked way.

Since:
4.2.405
Method Detail

getValue

@Nullable
T getValue()
Get the current value stored by this value holder.

Returns:
The currently stored value.
Since:
4.2.405

setValue

@RunsInEDT
void setValue(@Nullable
                        T value)
Set the given value to be stored by this value holder.

The outer framework guarantees, that this method will always be invoked from within the event dispatcher thread!

Parameters:
value - A value to store.
Since:
4.2.405

isEmpty

boolean isEmpty()
Indicates that the currently hold value is considered to represent an empty value.

Returns:
true, if value is considered empty.
Since:
4.2.405


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480