|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
V - is the generic type of the value.public interface Datatype<V>
This is the interface for a datatype. A datatype is an
immutable object representing a simple value of a specific type.
Common generic datatypes are String, Boolean, Long,
Integer, Double and Date. They should be
accepted as datatypes even though they do NOT implement this interface.
An implementation of this interface should declare all its
member variables as final and bind them at
construction. An Enum
implementing this interface should also offer a static method called
fromValue(V value) that returns the appropriate Enum
instance or null if no such instance exists.
| Method Summary | |
|---|---|
String |
getTitle()
This method gets the title of this datatype. |
V |
getValue()
This method returns the raw value of this datatype. |
String |
toString()
This method needs to return the same result a getTitle(). |
| Method Detail |
|---|
V getValue()
java.lang datatype. In case of a composed datatype it
is also legal that this method returns the datatype instance itself.
String getTitle()
NlsMessage).toString() is quite weak, this
method is added to explicitly express the presence of the title and to
ensure implementors of this interface can NOT miss to implement this.
toString()String toString()
getTitle().
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||