Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.zazof.jteg
Class DiceMessage  view DiceMessage download DiceMessage.java

java.lang.Object
  extended byorg.zazof.jteg.Message
      extended byorg.zazof.jteg.DiceMessage

public class DiceMessage
extends Message


Field Summary
private  int $fromDice0
           
private  int $fromDice1
           
private  int $fromDice2
           
private  int $fromID
           
private  int $toDice0
           
private  int $toDice1
           
private  int $toDice2
           
private  int $toID
           
 
Fields inherited from class org.zazof.jteg.Message
 
Constructor Summary
DiceMessage(Message nextMessage)
           
 
Method Summary
 Message decodeMessage(java.lang.String messageDescription)
          This method will return a Message that correctly processed the string according the active protocol.
 int getFromCountryID()
           
 int getFromDiceValue(int diceNb)
           
 java.lang.String getMessageName()
          This method returns the name of the message (e.g.
 int getToCountryID()
           
 int getToDiceValue(int diceNb)
           
 
Methods inherited from class org.zazof.jteg.Message
constructMessageString, getNextMessage, hasNextMessage, setNextMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$fromID

private int $fromID

$toID

private int $toID

$fromDice0

private int $fromDice0

$fromDice1

private int $fromDice1

$fromDice2

private int $fromDice2

$toDice0

private int $toDice0

$toDice1

private int $toDice1

$toDice2

private int $toDice2
Constructor Detail

DiceMessage

public DiceMessage(Message nextMessage)
Method Detail

decodeMessage

public Message decodeMessage(java.lang.String messageDescription)
                      throws UnknownMessageException
Description copied from class: Message
This method will return a Message that correctly processed the string according the active protocol. If no message was found that could process the inputstring, an exception is thrown.

The default implementation by message just passes the request on to the next message in the chain. If other behaviour is desired, this method needs to be overridden.

Overrides:
decodeMessage in class Message

getMessageName

public java.lang.String getMessageName()
Description copied from class: Message
This method returns the name of the message (e.g. 'attaque' or 'loser', ...).

Specified by:
getMessageName in class Message

getFromCountryID

public int getFromCountryID()

getToCountryID

public int getToCountryID()

getFromDiceValue

public int getFromDiceValue(int diceNb)

getToDiceValue

public int getToDiceValue(int diceNb)