Package com.norconex.commons.lang.map
Enum Class PropertySetter
- All Implemented Interfaces:
Serializable,Comparable<PropertySetter>,Constable
Convenient way of handling the different ways a value (or values) can
be set on a Properties instance.
XML configuration usage:
onSet="[append|prepend|replace|optional]"
The above is the recommended attribute for consuming classes to use in XML configuration.
- Since:
- 2.0.0
- Author:
- Pascal Essiembre
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(Properties properties, String key, Object value) static PropertySetterstatic PropertySetterfrom(String name, PropertySetter defaultSetter) static PropertySetterfromXML(XML xml, PropertySetter defaultValue) static PropertySetterorAppend(PropertySetter setter) static PropertySetterorOptional(PropertySetter setter) static PropertySetterorPrepend(PropertySetter setter) static PropertySetterorReplace(PropertySetter setter) static voidtoXML(XML xml, PropertySetter setter) static PropertySetterReturns the enum constant of this class with the specified name.static PropertySetter[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
APPEND
-
PREPEND
-
REPLACE
-
OPTIONAL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
apply
-
from
-
from
-
orAppend
-
orOptional
-
orPrepend
-
orReplace
-
fromXML
-
toXML
-