uk.me.parabola.mkgmap.reader.osm
Class WatchableTypeResult

java.lang.Object
  extended by uk.me.parabola.mkgmap.reader.osm.WatchableTypeResult
All Implemented Interfaces:
TypeResult

public class WatchableTypeResult
extends java.lang.Object
implements TypeResult

At the top level we need to be able to watch to see if a result was found to implement stop-on-first-match, continue and the like.

Author:
Steve Ratcliffe

Field Summary
 
Fields inherited from interface uk.me.parabola.mkgmap.reader.osm.TypeResult
NULL_RESULT
 
Constructor Summary
WatchableTypeResult(TypeResult result)
           
 
Method Summary
 void add(Element el, GType type)
          Add the resolved type to next stage in the map making process.
 boolean isActionsOnly()
           
 boolean isFound()
          Was a result found.
 boolean isResolved()
          Are we all done for this element?
 void reset()
          Reset the watcher for the next element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WatchableTypeResult

public WatchableTypeResult(TypeResult result)
Method Detail

add

public void add(Element el,
                GType type)
Description copied from interface: TypeResult
Add the resolved type to next stage in the map making process.

Specified by:
add in interface TypeResult
Parameters:
el - The OSM element.
type - The Garmin type that this resolves too.

isFound

public boolean isFound()
Was a result found.

Returns:
True if one or more results were added since the last reset.

isResolved

public boolean isResolved()
Are we all done for this element?

Returns:
True if we found a matching type and it did not have the continue flag set.

isActionsOnly

public boolean isActionsOnly()

reset

public void reset()
Reset the watcher for the next element.