biweekly.property
Class EnumProperty
java.lang.Object
biweekly.property.ICalProperty
biweekly.property.ValuedProperty<String>
biweekly.property.TextProperty
biweekly.property.EnumProperty
- Direct Known Subclasses:
- Action, CalendarScale, Classification, Status, Transparency
public abstract class EnumProperty
- extends TextProperty
Parent class for properties that have a defined set of acceptable values (for
example, Action
).
- Author:
- Michael Angstadt
Method Summary |
protected abstract Collection<String> |
getStandardValues()
Gets the list of acceptable values for this property. |
protected boolean |
is(String value)
Compares the property's value with a given string (case-insensitive). |
protected void |
validate(List<ICalComponent> components,
List<String> warnings)
Checks the property for data consistency problems or deviations from the
spec. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumProperty
public EnumProperty(String value)
- Creates an enum property.
- Parameters:
value
- the property value
is
protected boolean is(String value)
- Compares the property's value with a given string (case-insensitive).
- Parameters:
value
- the string
- Returns:
- true if it's equal, false if not
getStandardValues
protected abstract Collection<String> getStandardValues()
- Gets the list of acceptable values for this property.
- Returns:
- the list of acceptable values
validate
protected void validate(List<ICalComponent> components,
List<String> warnings)
- Description copied from class:
ICalProperty
- Checks the property for data consistency problems or deviations from the
spec. Meant to be overridden by child classes that wish to provide
validation logic.
- Overrides:
validate
in class ValuedProperty<String>
- Parameters:
components
- the hierarchy of components that the property belongs
towarnings
- the list to add the warnings to
Copyright © 2013 Michael Angstadt. All Rights Reserved.