Class ConditionalKeys.ConditionalValue
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.tests.ConditionalKeys.ConditionalValue
-
- Enclosing class:
- ConditionalKeys
public static class ConditionalKeys.ConditionalValue extends java.lang.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 java.util.Collection<java.lang.String>
conditions
The conditions forrestrictionValue
java.lang.String
restrictionValue
The value the tag should have if the condition matches
-
Constructor Summary
Constructors Constructor Description ConditionalValue(java.lang.String restrictionValue, java.util.Collection<java.lang.String> conditions)
Create a newConditionalKeys.ConditionalValue
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<ConditionalKeys.ConditionalValue>
parse(java.lang.String value)
Parses the condition values as string.
-
-
-
Field Detail
-
restrictionValue
public final java.lang.String restrictionValue
The value the tag should have if the condition matches
-
conditions
public final java.util.Collection<java.lang.String> conditions
The conditions forrestrictionValue
-
-
Constructor Detail
-
ConditionalValue
public ConditionalValue(java.lang.String restrictionValue, java.util.Collection<java.lang.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 java.util.List<ConditionalKeys.ConditionalValue> parse(java.lang.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
-
-