JMSLTM Numerical Library 4.0

com.imsl
Class Messages

java.lang.Object
  extended bycom.imsl.Messages

public class Messages
extends Object

Retrieve and format message strings.


Constructor Summary
Messages()
           
 
Method Summary
static int check(int arg)
           
static String formatMessage(String bundleName, String key)
          A message is formatted, without arguments, using a MessageFormat string retrieved from the named resource bundle using the given key.
static String formatMessage(String bundleName, String key, Object[] arg)
          A message is formatted using a MessageFormat string retrieved from the named resource bundle using the given key.
static void throwIllegalArgumentException(String packageName, String key, Object[] args)
          Throws an IllegalArgumentException with a formatted String argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
Method Detail

check

public static int check(int arg)

formatMessage

public static String formatMessage(String bundleName,
                                   String key)
A message is formatted, without arguments, using a MessageFormat string retrieved from the named resource bundle using the given key.

Parameters:
bundleName - is the resource bundle name.
key - is the key of the MessageFormat string in the resource bundle.

formatMessage

public static String formatMessage(String bundleName,
                                   String key,
                                   Object[] arg)
A message is formatted using a MessageFormat string retrieved from the named resource bundle using the given key.

Parameters:
bundleName - is the resource bundle name.
key - is the key of the MessageFormat string in the resource bundle.
arg - is an array of arguments passed to the MessageFormat.format method.

throwIllegalArgumentException

public static void throwIllegalArgumentException(String packageName,
                                                 String key,
                                                 Object[] args)
Throws an IllegalArgumentException with a formatted String argument.

Parameters:
packageName - is package from which the error is thrown. The resource bundle "ErrorMessages" in this package contains the error MessageFormat string.
key - is the key of the MessageFormat string in the resource bundle.
args - is an array of arguments passed to the MessageFormat.format method.

JMSLTM Numerical Library 4.0

Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.