Java EE 5 SDK

com.sun.appserv.management.util.stringifier
Class IteratorStringifierBase

java.lang.Object
  extended by com.sun.appserv.management.util.stringifier.IteratorStringifierBase
All Implemented Interfaces:
Stringifier
Direct Known Subclasses:
IteratorStringifier

public abstract class IteratorStringifierBase
extends Object
implements Stringifier

Stringifies an Iterator, using an optional element Stringifier. Must be subclassed to provide Stringification of an element.


Field Summary
static IteratorStringifier DEFAULT
           
 String mDelim
           
 Stringifier mElementStringifier
           
 
Constructor Summary
IteratorStringifierBase()
           
IteratorStringifierBase(String delim)
           
IteratorStringifierBase(Stringifier elementStringifier)
           
IteratorStringifierBase(String delim, Stringifier elementStringifier)
           
 
Method Summary
 String stringify(Iterator iter, String delim, Stringifier stringifier)
           
 String stringify(Object o)
          Produce a String representation of an object.
protected abstract  void stringifyElement(Object elem, String delim, StringBuffer buf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mDelim

public final String mDelim

mElementStringifier

public final Stringifier mElementStringifier

DEFAULT

public static final IteratorStringifier DEFAULT
Constructor Detail

IteratorStringifierBase

public IteratorStringifierBase()

IteratorStringifierBase

public IteratorStringifierBase(String delim)

IteratorStringifierBase

public IteratorStringifierBase(Stringifier elementStringifier)

IteratorStringifierBase

public IteratorStringifierBase(String delim,
                               Stringifier elementStringifier)
Method Detail

stringify

public String stringify(Object o)
Description copied from interface: Stringifier
Produce a String representation of an object. The actual output has no other semantics; each Stringifier may choose to target a particular type of user.

The resulting String should be suitable for display to a user.

Specified by:
stringify in interface Stringifier
Parameters:
o - the Object for which a String should be produced

stringifyElement

protected abstract void stringifyElement(Object elem,
                                         String delim,
                                         StringBuffer buf)

stringify

public String stringify(Iterator iter,
                        String delim,
                        Stringifier stringifier)

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.