com.clra.web
Class MemberNameFormat
java.lang.Object
|
+--com.clra.web.MemberNameFormat
- All Implemented Interfaces:
- Serializable
- public abstract class MemberNameFormat
- extends Object
- implements Serializable
Formats the name of CLRA member according to a few different patterns.
- Version:
- $Revision: 1.2 $ $Date: 2002/02/18 18:06:19 $
- Author:
- Rick Hall
- See Also:
- Serialized Form
Method Summary |
String |
format(MemberName memberName)
Returns a non-null, non-blank, trimmed String representing the name
of a member. |
protected abstract String |
protectedFormat(MemberName memberName)
Subclasses must implement this method to define formatting behavior. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIRSTONLY
public static final MemberNameFormat FIRSTONLY
- Returns a string of the form:
First
FIRSTLAST
public static final MemberNameFormat FIRSTLAST
- Returns a string of the form:
First [Middle] Last [Suffix]
LASTFIRST
public static final MemberNameFormat LASTFIRST
- Returns a string of the form:
Last, First [Middle] [Suffix]
MemberNameFormat
protected MemberNameFormat()
format
public final String format(MemberName memberName)
- Returns a non-null, non-blank, trimmed String representing the name
of a member. This method is a template. Subclasses should implement
protectedFormat(MemberName) to define new formatting behaviour.
- Parameters:
memberName
- a non-null MemberName (enforced)- Returns:
- a non-null, non-blank String (enforced)
protectedFormat
protected abstract String protectedFormat(MemberName memberName)
- Subclasses must implement this method to define formatting behavior.
Subclasses must return a non-null, non-blank String. They do not
have to check that the member name is valid; that check has already
been performed. Nor do they have to trim the return value; that task
will be automatically performed before the return value is passed back.