Java EE 5 SDK

com.sun.appserv.management.util.misc
Class StringSourceBase

java.lang.Object
  extended by com.sun.appserv.management.util.misc.StringSourceBase
All Implemented Interfaces:
StringSource
Direct Known Subclasses:
MapStringSource, PropertiesStringSource, StringStringSource

public class StringSourceBase
extends Object
implements StringSource

Default base class for StringSource implementationsn.


Constructor Summary
StringSourceBase()
           
StringSourceBase(StringSource next)
           
 
Method Summary
 String getString(String id)
          Get the String referred to by 'id'
 String getString(String id, String defaultValue)
          Get the String referred to by 'id'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSourceBase

public StringSourceBase()

StringSourceBase

public StringSourceBase(StringSource next)
Method Detail

getString

public String getString(String id)
Description copied from interface: StringSource
Get the String referred to by 'id'

Specified by:
getString in interface StringSource
Parameters:
id - the id (key) for the String
Returns:
the String, or null if not found

getString

public String getString(String id,
                        String defaultValue)
Description copied from interface: StringSource
Get the String referred to by 'id'.

Specified by:
getString in interface StringSource
Parameters:
id - the id (key) for the String
defaultValue - the default value to be returned if string was not found
Returns:
the String, or defaultValue if not found

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.