com.sun.appserv.management.util.misc
Class MapStringSource
java.lang.Object
com.sun.appserv.management.util.misc.StringSourceBase
com.sun.appserv.management.util.misc.MapStringSource
- All Implemented Interfaces:
- StringSource
public class MapStringSource
- extends StringSourceBase
- implements StringSource
An abstraction for getting a String, given an id string.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapStringSource
public MapStringSource(Map<String,String> mapping)
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- Overrides:
getString in class StringSourceBase
- Parameters:
id - the id (key) for the StringdefaultValue - the default value to be returned if string was not found
- Returns:
- the String, or defaultValue if not found
Submit a bug or feature Copyright 2006 Sun Microsystems, Inc. All rights reserved.