|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.environments.robot.RoombaSuccessPercept
public class RoombaSuccessPercept
Represents a success-or-not percept received by the Roomba robot from its environment.
The percept is a simple indication of success or failure of the last attempted action. If the action succeeded, you can assume that your robot successfully changed position. If the action failed, you can obtain additional information about
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.columbia.cs.coms4701.agent.environments.robot.RobotSuccessPercept |
---|
RobotSuccessPercept.ReasonForFailure |
Constructor Summary | |
---|---|
RoombaSuccessPercept()
Constructs a new percept of success. |
|
RoombaSuccessPercept(java.lang.Boolean success,
RobotSuccessPercept.ReasonForFailure reasonForFailure)
Constructs a new percept with the given success and reason for failure (possibly null). |
Method Summary | |
---|---|
RobotSuccessPercept.ReasonForFailure |
getReasonForFailure()
Indicates the reason for the failure of an attempted move. |
java.lang.String |
toString()
|
java.lang.Boolean |
wasSuccessful()
Indicates whether the last action attempted by the robot was successful or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RoombaSuccessPercept(java.lang.Boolean success, RobotSuccessPercept.ReasonForFailure reasonForFailure)
success
- whether the last action was successfulreasonForFailure
- if not, why. (will be null if success is true)public RoombaSuccessPercept()
Method Detail |
---|
public java.lang.Boolean wasSuccessful()
wasSuccessful
in interface RobotSuccessPercept
public RobotSuccessPercept.ReasonForFailure getReasonForFailure()
Should return null if the move was *not* a failure
getReasonForFailure
in interface RobotSuccessPercept
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |