com.yosokumo.core
Class Message

java.lang.Object
  extended by com.yosokumo.core.Message

public class Message
extends java.lang.Object

A text message with a type indicating if the message is information or an error. Some responses from the Yokosumo service return messages, especially in case of error.


Nested Class Summary
static class Message.Type
          Indicates whether the message is informational or an error message.
 
Field Summary
private  java.lang.String text
          The message text.
private  Message.Type type
          The type of message.
 
Constructor Summary
Message(Message.Type type, java.lang.String text)
          Initializes a newly created Message object with attributes specified by the input parameters.
 
Method Summary
 java.lang.String getText()
          Return the message text.
 Message.Type getType()
          Return the message type.
 java.lang.String toString()
          Return a string representation of this Message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private Message.Type type
The type of message.


text

private java.lang.String text
The message text.

Constructor Detail

Message

Message(Message.Type type,
        java.lang.String text)
Initializes a newly created Message object with attributes specified by the input parameters.

Parameters:
type - the type of the message: INFORMATION or ERROR.
text - the text of the message.
Method Detail

getText

public java.lang.String getText()
Return the message text.

Returns:
the text of the message.

getType

public Message.Type getType()
Return the message type.

Returns:
the type of this message.

toString

public java.lang.String toString()
Return a string representation of this Message.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this Message.