Class ConditionalKeys.ConditionalValue
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.tests.ConditionalKeys.ConditionalValue
-
- Enclosing class:
- ConditionalKeys
public static class ConditionalKeys.ConditionalValue extends Object
A conditional value is a value for the access restriction tag that depends on conditions (time, ...)
-
-
Field Summary
Fields Modifier and Type Field Description Collection<String>
conditions
The conditions forrestrictionValue
String
restrictionValue
The value the tag should have if the condition matches
-
Constructor Summary
Constructors Constructor Description ConditionalValue(String restrictionValue, Collection<String> conditions)
Create a newConditionalKeys.ConditionalValue
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<ConditionalKeys.ConditionalValue>
parse(String value)
Parses the condition values as string.
-
-
-
Field Detail
-
restrictionValue
public final String restrictionValue
The value the tag should have if the condition matches
-
conditions
public final Collection<String> conditions
The conditions forrestrictionValue
-
-
Constructor Detail
-
ConditionalValue
public ConditionalValue(String restrictionValue, Collection<String> conditions)
Create a newConditionalKeys.ConditionalValue
- Parameters:
restrictionValue
- The value the tag should have if the condition matchesconditions
- The conditions for that value
-
-
Method Detail
-
parse
public static List<ConditionalKeys.ConditionalValue> parse(String value)
Parses the condition values as string.- Parameters:
value
- value, must match<restriction-value> @ <condition>[;<restriction-value> @ <condition>]
pattern- Returns:
- list of
ConditionalValue
s - Throws:
ConditionalKeys.ConditionalParsingException
- ifvalue
does not match expected pattern
-
-