public abstract class Message extends Object implements Cloneable, Serializable
Application messages consist of at least the two properties
timestamp and formatArguments. The timestamp property
will be initialized during instantiation to hold the timestamp of instance
creation. Property formatArguments holds the arguments to use
for formatting message text. It is recommended that subclasses of this class
are declared final so that calling getClass() on a message
instance always returns a type uniquely identifying a message type in the
system.
MessageEvent,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static Comparator |
ASCENDING
Comparator for sorting messages in ascending order of occurence.
|
static Comparator |
DESCENDING
Comparator for sorting messages in descending order of occurence.
|
| Constructor and Description |
|---|
Message()
Creates a new
Message instance. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates and returns a copy of this object.
|
boolean |
equals(Object o)
Indicates whether some other object is equal to this one.
|
abstract Object[] |
getFormatArguments(Locale locale)
Getter for property
formatArguments. |
abstract String |
getText(Locale locale)
Gets the formatted message text.
|
long |
getTimestamp()
Getter for property
timestamp. |
int |
hashCode()
Returns a hash code value for this object.
|
String |
toString()
Returns a string representation of the object.
|
public static final Comparator ASCENDING
Note:
This comparator imposes orderings that are inconsistent with equals.
public static final Comparator DESCENDING
Note:
This comparator imposes orderings that are inconsistent with equals.
public Message()
Message instance.public final boolean equals(Object o)
Messages internally cary a UID which is created during instantiation.
This UID is used for comparing o with the instance.
public abstract Object[] getFormatArguments(Locale locale)
formatArguments.locale - the locale to be used for the arguments to return.public abstract String getText(Locale locale)
locale - the locale to be used for the text to return.locale.public final long getTimestamp()
timestamp.public final int hashCode()
Copyright © 2005-2012 jDTAUS. All Rights Reserved.