org.malai.mapping
Class ActiveUnary<T>

java.lang.Object
  extended by org.malai.mapping.ActiveUnary<T>
Type Parameters:
T - The type of the element contained by the active 0-1 relation.
All Implemented Interfaces:
IUnary<T>

public class ActiveUnary<T>
extends java.lang.Object
implements IUnary<T>

An active unary relation is an object that may contain a value (cardinalities 0..1). When the value is modified, the mapping registry is notified and the corresponding mappings executed.

This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN

Malai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

05/16/2010

Since:
0.2
Version:
0.2
Author:
Arnaud BLOUIN

Field Summary
protected  T value
          The value of the singleton.
 
Constructor Summary
ActiveUnary()
          Creates an empty singleton.
ActiveUnary(T value)
          Creates a singleton with a given value.
 
Method Summary
 T getValue()
           
 void setValue(T value)
          Sets a new value to the singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected T value
The value of the singleton.

Constructor Detail

ActiveUnary

public ActiveUnary()
Creates an empty singleton.

Since:
0.2

ActiveUnary

public ActiveUnary(T value)
Creates a singleton with a given value.

Parameters:
value - The value of the singleton.
Since:
0.2
Method Detail

getValue

public T getValue()
Specified by:
getValue in interface IUnary<T>
Returns:
The value of the singleton.

setValue

public void setValue(T value)
Description copied from interface: IUnary
Sets a new value to the singleton.

Specified by:
setValue in interface IUnary<T>
Parameters:
value - The new value.