com.ds.fw.types
Class FwDisplayable

java.lang.Object
  |
  +--com.ds.fw.types.FwDisplayable
All Implemented Interfaces:
FwDisplayableIF

public class FwDisplayable
extends java.lang.Object
implements FwDisplayableIF

I provide a simple example of how to implement FwDisplayableIF.


Constructor Summary
FwDisplayable()
           
 
Method Summary
 java.lang.String getClassName()
          This convenience method return the short class name.
 java.lang.String getDisplayString()
          If toStringValue is non-null then return it.
 java.lang.String getDisplayStringFor(java.lang.Object e)
          If the parameter implements FwDisplayableIF then return e.getDisplayString().
 java.lang.String toString()
          toString is understood by all objects but is included in this interface for conceptual completeness and documentation.
 java.lang.String toStringValue()
          Always return null ?!?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FwDisplayable

public FwDisplayable()
Method Detail

toString

public java.lang.String toString()
Description copied from interface: FwDisplayableIF
toString is understood by all objects but is included in this interface for conceptual completeness and documentation. In general toString should always identify the instance type (class) and, if available, some value that differentiates this instance from other instances of the same type. The recommended toString format for classes that implement this interface is: "classname[value]".

Specified by:
toString in interface FwDisplayableIF
Overrides:
toString in class java.lang.Object
Returns:

toStringValue

public java.lang.String toStringValue()
Always return null ?!?

Specified by:
toStringValue in interface FwDisplayableIF
Returns:
null

getDisplayString

public java.lang.String getDisplayString()
Description copied from interface: FwDisplayableIF
If toStringValue is non-null then return it. Otherwise return the class name.

Specified by:
getDisplayString in interface FwDisplayableIF

getDisplayStringFor

public java.lang.String getDisplayStringFor(java.lang.Object e)
Description copied from interface: FwDisplayableIF
If the parameter implements FwDisplayableIF then return e.getDisplayString(). Otherwise return e.toString().

Specified by:
getDisplayStringFor in interface FwDisplayableIF

getClassName

public java.lang.String getClassName()
Description copied from interface: FwDisplayableIF
This convenience method return the short class name. That is the class's name without the package prefix.

Specified by:
getClassName in interface FwDisplayableIF