|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.example.tennis.TennisBall
public class TennisBall
A tennis ball which has TTL value and state whose value is one of 'PING' and 'PONG'.
| Constructor Summary | |
|---|---|
TennisBall(int ttl)
Creates a new ball with the specified TTL (Time To Live) value. |
|
| Method Summary | |
|---|---|
int |
getTTL()
Returns the TTL value of this ball. |
TennisBall |
stroke()
Returns the ball after TennisPlayer's stroke. |
java.lang.String |
toString()
Returns string representation of this message ( [PING|PONG]
(TTL)). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TennisBall(int ttl)
| Method Detail |
|---|
public int getTTL()
public TennisBall stroke()
TennisPlayer's stroke.
The returned ball has decreased TTL value and switched PING/PONG state.
public java.lang.String toString()
[PING|PONG]
(TTL)).
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||