|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.util.BooleanResponse
This class allows a boolean value and an accompanying message to be treated as one object. The boolean value would be the response to a query, such as a request for a resignation. The message is an optional field, but if it is set it would indicate the reason for the response, such as "I estimate that I am ahead by 17 points, and will continue to play".
Field Summary | |
private String |
message
The message, if any. |
private boolean |
value
The boolean value to return. |
Constructor Summary | |
BooleanResponse(boolean val)
Create a BooleanResponse object without a message. |
|
BooleanResponse(boolean val,
String msg)
Create a BooleanResponse object with a message. |
Method Summary | |
String |
getMessage()
Return the message. |
boolean |
getResponse()
Return the boolean value of the object. |
boolean |
isMessageSet()
Return whether a message has been set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean value
private String message
Constructor Detail |
public BooleanResponse(boolean val)
val
- The boolean value of the response.public BooleanResponse(boolean val, String msg)
val
- The boolean value of the response.msg
- The message explaining the response.Method Detail |
public boolean getResponse()
public String getMessage()
public boolean isMessageSet()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |