public class WeekdayPropertyType extends EnumPropertyType<Weekday>
dk.heick.properties.types.custom.enums.Weekday. | Constructor Example | Comments | ||
|---|---|---|---|
Property<Weekday> A_PROPERTY = new Property<Weekday>("name", new WeekdayPropertyType()); |
No default value. | ||
Property<Weekday> A_PROPERTY = new Property<Weekday>("name", new WeekdayPropertyType(Weekday.SATURDAY)); |
With default value "Weekday.SATURDAY". | ||
| Type of value(s) | Examples | Result | Comments |
| Valid | TUESDAY | Weekday.TUESDAY | Validate successfully. |
| Valid | FriDay | Weekday.FRIDAY | Validate successfully. |
| Invalid | cow | null |
Validate will throw an exception. The resulting value is null. |
| Invalid | «empty string» | null |
|
| Invalid | «empty string after trim» | null |
|
| Invalid | null |
defaultValue OR null |
Validate will throw an exception. Return default value if set, otherwise null. |
Weekday,
Serialized FormTYPE| Constructor and Description |
|---|
WeekdayPropertyType()
Default constructor, with
null as default value. |
WeekdayPropertyType(Weekday defaultValue)
Constructor with default value.
|
getEnumClazz, getEnumConstants, getRestrictions, isAllLowercased, isAllUppercased, setEnumClazz, validateConstraints, validateValueequals, getDefaultValue, getDefaultValueAsString, getDefaultValueDescription, getDescription, getDescription, getInitializationPriority, getIo, getLogger, getTypeName, hasDefaultValue, isDefaultValueValid, postGetValueProcessing, setDefaultValue, setInitializationPriority, setIo, setTypedValue, setTypeName, toString, toType, validate, validateNullTypepublic WeekdayPropertyType()
null as default value.public WeekdayPropertyType(Weekday defaultValue)
defaultValue - default value returned if property value is undefined.