Enum Class JBBPSystemProperty

java.lang.Object
java.lang.Enum<JBBPSystemProperty>
com.igormaznitsa.jbbp.utils.JBBPSystemProperty
All Implemented Interfaces:
Serializable, Comparable<JBBPSystemProperty>, Constable

public enum JBBPSystemProperty extends Enum<JBBPSystemProperty>
The Enum contains all system properties which are used by the JBBP framework.
Since:
1.0
  • Enum Constant Details

    • PROPERTY_INSTANTIATOR_CLASS

      public static final JBBPSystemProperty 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

      public static final JBBPSystemProperty PROPERTY_INPUT_INITIAL_ARRAY_BUFFER_SIZE
      The Property allows to define the initial size for array buffer to read whole stream.
  • Method Details

    • values

      public static JBBPSystemProperty[] 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

      public static JBBPSystemProperty valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • set

      public void set(String value)
      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

      public String getAsString(String defaultValue)
      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

      public String getPropertyName()
      Get the property name.
      Returns:
      the property name