Class Conditional

  • All Implemented Interfaces:
    Formatter

    public class Conditional
    extends java.lang.Object
    implements Formatter
    If a condition is true use the corresponding value
    • Constructor Summary

      Constructors 
      Constructor Description
      Conditional​(@NotNull java.util.List<java.lang.String> conditionStrings, @NotNull java.util.List<java.lang.String> values)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.lang.String format​(@NotNull ch.poole.osm.josmfilterparser.Type type, @Nullable ch.poole.osm.josmfilterparser.Meta meta, @Nullable java.util.Map<java.lang.String,​java.lang.String> tags)
      Format a concrete OSM element
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Conditional

        public Conditional​(@NotNull
                           @NotNull java.util.List<java.lang.String> conditionStrings,
                           @NotNull
                           @NotNull java.util.List<java.lang.String> values)
                    throws ch.poole.osm.josmtemplateparser.ParseException
        Throws:
        ch.poole.osm.josmtemplateparser.ParseException
    • Method Detail

      • format

        @NotNull
        public @NotNull java.lang.String format​(@NotNull
                                                @NotNull ch.poole.osm.josmfilterparser.Type type,
                                                @Nullable
                                                @Nullable ch.poole.osm.josmfilterparser.Meta meta,
                                                @Nullable
                                                @Nullable java.util.Map<java.lang.String,​java.lang.String> tags)
        Description copied from interface: Formatter
        Format a concrete OSM element
        Specified by:
        format in interface Formatter
        Parameters:
        type - the Type of the OSM element
        meta - meta information for the OSM element or null
        tags - tags of the OSM element or null
        Returns:
        the formated "name"
      • toString

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