openfuture.util.misc
Class Message

java.lang.Object
  |
  +--openfuture.util.misc.Message
All Implemented Interfaces:
java.io.Serializable

public class Message
extends java.lang.Object
implements java.io.Serializable

Counterpart to MessageFormat.

Created: Tue Nov 20 18:14:09 2001

Version:
$Revision: 1.2 $
Author:
Wolfgang Reissenberger
See Also:
Serialized Form

Constructor Summary
Message(java.lang.String key)
          Creates a new Message instance without arguments.
Message(java.lang.String key, java.lang.Object[] args)
          Creates a new Message instance.
 
Method Summary
 java.lang.Object[] getArgs()
          Get the value of args.
 java.lang.String getKey()
          Get the value of key.
 void setArgs(java.lang.Object[] v)
          Set the value of args.
 void setKey(java.lang.String v)
          Set the value of key.
 java.lang.String toString()
          Create String simple representation without informations from a resource bundle.
 java.lang.String toString(java.util.ResourceBundle bundle)
          Create String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(java.lang.String key,
               java.lang.Object[] args)
Creates a new Message instance.
Parameters:
key - Message key that should be extracted from the ressource bundles.
args - Object array holding the arguments.

Message

public Message(java.lang.String key)
Creates a new Message instance without arguments.
Parameters:
key - Message key that should be extracted from the ressource bundles.
Method Detail

getKey

public java.lang.String getKey()
Get the value of key.
Returns:
value of key.

setKey

public void setKey(java.lang.String v)
Set the value of key.
Parameters:
v - Value to assign to key.

getArgs

public java.lang.Object[] getArgs()
Get the value of args.
Returns:
value of args.

setArgs

public void setArgs(java.lang.Object[] v)
Set the value of args.
Parameters:
v - Value to assign to args.

toString

public java.lang.String toString(java.util.ResourceBundle bundle)
Create String representation.
Parameters:
bundle - ressource bundle to be used
Returns:
a value of type 'String'

toString

public java.lang.String toString()
Create String simple representation without informations from a resource bundle. Consequently, the key is returned.
Overrides:
toString in class java.lang.Object
Returns:
the message key


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.