uk.me.parabola.mkgmap.osmstyle.actions
Class ValueBuilder

java.lang.Object
  extended by uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder

public class ValueBuilder
extends java.lang.Object

Build a value that can have tag values substituted in it.

Author:
Steve Ratcliffe, Toby Speight

Constructor Summary
ValueBuilder(java.lang.String pattern)
           
 
Method Summary
 java.lang.String build(Element el, Element lel)
          Build this string if all the tags that are required are available.
 java.util.Set<java.lang.String> getUsedTags()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueBuilder

public ValueBuilder(java.lang.String pattern)
Method Detail

build

public java.lang.String build(Element el,
                              Element lel)
Build this string if all the tags that are required are available. If a tag does not exist then the whole string is rejected. This allows you to make conditional replacements.

Parameters:
el - Used as a source of tags.
lel - Used as a source of local tags.
Returns:
The built string if all required tags are available. If any are missing then it returns null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getUsedTags

public java.util.Set<java.lang.String> getUsedTags()