net.sf.japaki.beans
Class SimpleBean<V>

java.lang.Object
  extended by net.sf.japaki.beans.SimpleBean<V>
All Implemented Interfaces:
SinglePropertyBean<V>

public class SimpleBean<V>
extends Object
implements SinglePropertyBean<V>

A bean with a single property.


Constructor Summary
SimpleBean()
           
 
Method Summary
 boolean equals(Object obj)
           
static
<E> Property<SinglePropertyBean<E>,E>
getProperty()
          Returns the property of this bean.
 V getValue()
          Returns the value of the (single) property of this bean.
 int hashCode()
           
static
<V> SimpleBean<V>
newInstance(V value)
          Creates a new simple bean
 V setValue(V value)
          Changes the value of the (single) property of this bean.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleBean

public SimpleBean()
Method Detail

newInstance

public static <V> SimpleBean<V> newInstance(V value)
Creates a new simple bean

Parameters:
value - initital value of the property

getValue

public V getValue()
Returns the value of the (single) property of this bean.

Specified by:
getValue in interface SinglePropertyBean<V>
Returns:
the value of the (single) property of this bean

setValue

public V setValue(V value)
Changes the value of the (single) property of this bean.

Specified by:
setValue in interface SinglePropertyBean<V>
Parameters:
value - new value of the property
Returns:
the previously stored value

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

getProperty

public static <E> Property<SinglePropertyBean<E>,E> getProperty()
Returns the property of this bean.

Returns:
the property of this bean