|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.appserv.management.util.misc.Formatter
public final class Formatter
Escapes/unescapes strings
Constructor Summary | |
---|---|
Formatter(StringSource source)
|
Method Summary | |
---|---|
String |
format(String key,
Object o1)
|
String |
format(String key,
Object[] objects)
Format the objects into a String using the pattern specified by 'key'. |
String |
format(String key,
Object o1,
Object o2)
|
String |
format(String key,
Object o1,
Object o2,
Object o3)
|
String |
format(String key,
Object o1,
Object o2,
Object o3,
Object o4)
|
String |
getString(String id)
Get the String referred to by 'id' |
String |
getString(String id,
String defaultValue)
Get the String referred to by 'id'. |
Object |
prepare(Object o)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Formatter(StringSource source)
Method Detail |
---|
public Object prepare(Object o)
public String format(String key, Object[] objects)
key
- key used to look up the patternobjects
- array of objects to insert into the patternpublic String format(String key, Object o1)
public String format(String key, Object o1, Object o2)
public String format(String key, Object o1, Object o2, Object o3)
public String format(String key, Object o1, Object o2, Object o3, Object o4)
public String getString(String id)
StringSource
getString
in interface StringSource
id
- the id (key) for the String
public String getString(String id, String defaultValue)
StringSource
getString
in interface StringSource
id
- the id (key) for the StringdefaultValue
- the default value to be returned if string was not found
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.