org.nakedobjects.object
Interface NakedValue

All Superinterfaces:
Naked, java.io.Serializable
All Known Implementing Classes:
AbstractNakedValue

public interface NakedValue
extends Naked, java.io.Serializable

Definition of an naked value object.

A basic implementation is defined in AbstractNakedValue and concrete implementation in it subclasses: TextString, URLString, Date, Logical, WholeNumber, FloatingPointNumber, Percentage, Currency.

An naked value object must do the following

See Also:
AbstractNakedValue

Method Summary
 void clear()
          Clears the value so that it is empty, i.e.
 boolean isNull()
          Deprecated.  
 void parse(java.lang.String text)
          Takes a user entry string which is parsed to set up the object.
 void reset()
          Resets a value to its default value.
 void restoreString(java.lang.String data)
          Takes a storage string and uses it reinstate this value object to its previous state/
 java.lang.String saveString()
          Returns a basic string representation of this value for storage purposes.
 void setNull()
          Deprecated.  
 
Methods inherited from interface org.nakedobjects.object.Naked
about, copyObject, getClassName, getFullClassName, getObjectHelpText, isEmpty, isSameAs, isValid, summary, title
 

Method Detail

clear

public void clear()
Clears the value so that it is empty, i.e. isEmpty returns true.


isNull

public boolean isNull()
Deprecated.  

See Also:
Naked.isEmpty()

parse

public void parse(java.lang.String text)
           throws ValueParseException
Takes a user entry string which is parsed to set up the object. This needs to accomodate punctuation and adornments such as currency signs.

Throws:
ValueParseException
See Also:
restoreString(String)

setNull

public void setNull()
Deprecated.  

See Also:
clear()

reset

public void reset()
Resets a value to its default value. Contrast this with the clear method.


restoreString

public void restoreString(java.lang.String data)
Takes a storage string and uses it reinstate this value object to its previous state/

Parameters:
data -
See Also:
parse(String)

saveString

public java.lang.String saveString()
Returns a basic string representation of this value for storage purposes.