jcmdline
Class Strings

java.lang.Object
  extended by jcmdline.Strings

public class Strings
extends java.lang.Object

A helper class used to obtain Strings for this package. Strings are retrieved from the ResourceBundle in "jcmdline.strings" which may be localized as necessary.

Version:
jcmdline Rel. 2.0.0 $Id: Strings.java,v 1.2 2002/12/07 14:22:06 lglawrence Exp $
Author:
Lynne Lawrence
See Also:
ResourceBundle

Constructor Summary
Strings()
           
 
Method Summary
static java.lang.String get(java.lang.String key)
          Gets a String.
static java.lang.String get(java.lang.String key, java.lang.Object[] params)
          Gets a String, filling in the supplied parameters.
static java.lang.String join(java.lang.String separator, java.lang.Object[] objs)
          Join the toString() representations of the specified objects, separating them with the specified separator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strings

public Strings()
Method Detail

get

public static java.lang.String get(java.lang.String key)
Gets a String.

Parameters:
key - the key with which to look up the String in the ResourceBundle
Returns:
The String, associated with key. Should key not exist in the ResourceBundle a String consisting of the key is returned.
See Also:
ResourceBundle

get

public static java.lang.String get(java.lang.String key,
                                   java.lang.Object[] params)
Gets a String, filling in the supplied parameters.

Parameters:
key - the key with which to look up the String in the ResourceBundle
params - parameters to be plugged into the String
Returns:
The String, associated with key, with the supplied params plugged in as described for java.text.MessageFormat. Should key not exist in the ResourceBundle a String containing the key and a list of the parameters is returned.
See Also:
MessageFormat, ResourceBundle

join

public static java.lang.String join(java.lang.String separator,
                                    java.lang.Object[] objs)
Join the toString() representations of the specified objects, separating them with the specified separator.

Parameters:
separator - the String to be inserted between the toString() representations of the Objects
objs - the objects
Returns:
the resulting String