public class LocalVacuumEnvironmentPercept extends DynamicPercept
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTRIBUTE_AGENT_LOCATION |
static java.lang.String |
ATTRIBUTE_STATE |
| Constructor and Description |
|---|
LocalVacuumEnvironmentPercept(java.lang.String agentLocation,
VacuumEnvironment.LocationState state)
Construct a vacuum environment percept from the agent's perception of the
current location and state.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAgentLocation()
Return the agent's perception of the current location, which is either A
or B.
|
VacuumEnvironment.LocationState |
getLocationState()
Return the agent's perception of the current state, which is either
Clean or Dirty.
|
boolean |
matches(VacuumEnvironmentState state,
Agent agent)
Determine whether this percept matches an environment state
|
java.lang.String |
toString()
Return string representation of this percept.
|
describeTypecopy, describeAttributes, equals, getAttribute, getKeySet, hashCode, removeAttribute, setAttributepublic static final java.lang.String ATTRIBUTE_AGENT_LOCATION
public static final java.lang.String ATTRIBUTE_STATE
public LocalVacuumEnvironmentPercept(java.lang.String agentLocation,
VacuumEnvironment.LocationState state)
agentLocation - the agent's perception of the current location.state - the agent's perception of the current state.public java.lang.String getAgentLocation()
public VacuumEnvironment.LocationState getLocationState()
public boolean matches(VacuumEnvironmentState state, Agent agent)
state - agent - public java.lang.String toString()
toString in class ObjectWithDynamicAttributes