|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.uni_paderborn.robots.robot.group10.ItemIdMatcher
Implementation of MapItemMatcher that searches for the shortest path to a map item with a specified id.
| Field Summary | |
protected int |
id
The id to search for. |
| Constructor Summary | |
ItemIdMatcher(int id)
Creates a new ItemTypeMatcher that searches for map items with the specified id. |
|
| Method Summary | |
boolean |
equals(java.lang.Object otherMapItemMatcher)
Tests if this ItemIdMatcher searches for the same map items as the specified object. |
boolean |
finished(MapItem mapItem)
Determines if the search is finished after mapItem is found.
|
boolean |
matches(MapItem mapItem)
Tests if this map item's id matches the reqested id. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected int id
| Constructor Detail |
public ItemIdMatcher(int id)
id - the id to search for| Method Detail |
public boolean matches(MapItem mapItem)
matches in interface MapItemMatchermapItem - the map item to checkpublic boolean finished(MapItem mapItem)
mapItem is found.
Because ItemIdMatcher only searches for exactly one map item, the search should immediately stop whenever the first item is found. * @param mapItem map item whose search is completedfinished in interface MapItemMatchermapItem - a reference to the mapItempublic boolean equals(java.lang.Object otherMapItemMatcher)
equals in class java.lang.ObjectotherMapItemMatcher - an object, preferably an ItemIdMatcher, however it is no harm if something else is passed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||