Package com.igormaznitsa.jbbp.utils
Enum Class JBBPSystemProperty
- All Implemented Interfaces:
Serializable,Comparable<JBBPSystemProperty>,Constable
The Enum contains all system properties which are used by the JBBP framework.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe Property allows to define the initial size for array buffer to read whole stream.The Property allows to define which class will work as a class instantiator for the JBBP mapper. -
Method Summary
Modifier and TypeMethodDescriptionintgetAsInteger(int defaultValue) Get the property value as integer.getAsString(String defaultValue) Get the property value as string.Get the property name.voidremove()Remove the property.voidSet a value to the property.static JBBPSystemPropertyReturns the enum constant of this class with the specified name.static JBBPSystemProperty[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PROPERTY_INSTANTIATOR_CLASS
The Property allows to define which class will work as a class instantiator for the JBBP mapper. -
PROPERTY_INPUT_INITIAL_ARRAY_BUFFER_SIZE
The Property allows to define the initial size for array buffer to read whole stream.
-
-
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
-
set
Set a value to the property.- Parameters:
value- the value to be set to the property, must not be null.
-
remove
public void remove()Remove the property. -
getAsString
Get the property value as string.- Parameters:
defaultValue- the default value which will be returned if there is not defined value for the property.- Returns:
- the value as string or the default value if it is not defined
-
getAsInteger
public int getAsInteger(int defaultValue) Get the property value as integer.- Parameters:
defaultValue- the default value which will be returned if there is not defined value for the property.- Returns:
- the value as integer or the default value if it is not defined
- Throws:
Error- if the value can't be recognized as integer
-
getPropertyName
Get the property name.- Returns:
- the property name
-