|
|||||||||
| 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.ItemTypeMatcher
Implementation of MapItemMatcher that searches for the shortest path to a map item with a specified type.
| Field Summary | |
protected short |
type
The type to search for |
| Constructor Summary | |
ItemTypeMatcher(short type)
Creates a new ItemTypeMatcher that searches for map items with the specified type. |
|
| Method Summary | |
boolean |
equals(java.lang.Object otherMapItemMatcher)
Tests if this ItemTypeMatcher 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 type. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected short type
| Constructor Detail |
public ItemTypeMatcher(short type)
type - the type 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 ItemTypeMatcher only searches for exactly one map item, the search should immediately stop whenever the first item is found.finished in interface MapItemMatchermapItem - map item whose search is completedpublic boolean equals(java.lang.Object otherMapItemMatcher)
equals in class java.lang.ObjectotherMapItemMatcher - an object, preferably an ItemTypeMatcher, 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 | ||||||||