Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.clra.web
Class MemberNameFormat  view MemberNameFormat download MemberNameFormat.java

java.lang.Object
  extended bycom.clra.web.MemberNameFormat
All Implemented Interfaces:
java.io.Serializable

public abstract class MemberNameFormat
extends java.lang.Object
implements java.io.Serializable

Formats the name of member according to a few different patterns.

Version:
$Revision: 1.4 $ $Date: 2003/02/26 03:38:46 $

Field Summary
static MemberNameFormat FIRSTLAST
          Returns a string of the form:
static MemberNameFormat FIRSTONLY
          Returns a string of the form:
static MemberNameFormat LASTFIRST
          Returns a string of the form:
 
Constructor Summary
protected MemberNameFormat()
           
 
Method Summary
 java.lang.String format(com.clra.member.MemberName memberName)
          Returns a non-null, non-blank, trimmed String representing the name of a member.
private static void postConditions(java.lang.String retVal)
           
private static void preConditions(com.clra.member.MemberName memberName)
           
protected abstract  java.lang.String protectedFormat(com.clra.member.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
 

Field Detail

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]
 

Constructor Detail

MemberNameFormat

protected MemberNameFormat()
Method Detail

format

public final java.lang.String format(com.clra.member.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.


preConditions

private static final void preConditions(com.clra.member.MemberName memberName)

postConditions

private static final void postConditions(java.lang.String retVal)

protectedFormat

protected abstract java.lang.String protectedFormat(com.clra.member.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.