Enum Class BMValueType

java.lang.Object
java.lang.Enum<BMValueType>
com.webfirmframework.wffweb.wffbm.data.BMValueType
All Implemented Interfaces:
Serializable, Comparable<BMValueType>, Constable

public enum BMValueType extends Enum<BMValueType>
BM Object/Array value type
  • Enum Constant Details

    • STRING

      public static final BMValueType STRING
      to initialize String value
    • NUMBER

      public static final BMValueType NUMBER
      It can be int, float, long, double or any 64 bit floating point number
    • UNDEFINED

      public static final BMValueType UNDEFINED
      to assign unidentified in JavaScript value, the value can be null for this data type.
    • NULL

      public static final BMValueType NULL
      to initialize null value
    • BOOLEAN

      public static final BMValueType BOOLEAN
      to initialize boolean value
    • BM_OBJECT

      public static final BMValueType BM_OBJECT
      to initialize another WffBMObject
    • BM_ARRAY

      public static final BMValueType BM_ARRAY
      to initialize another WffBMArray
    • REG_EXP

      public static final BMValueType REG_EXP
      to initialize reg expression
    • FUNCTION

      public static final BMValueType FUNCTION
      to initialize function, eg: function(arg) {alert(arg);}
       
       WffBMObject bmObject = new WffBMObject();
       bmObject.put("testMeFun", BMValueType.FUNCTION, "function(arg) {alert(arg);}");
       so the usage would be jsObject.testMeFun("Hello world");
       
       
    • BM_BYTE_ARRAY

      public static final BMValueType BM_BYTE_ARRAY
      to initialize binary data. In java it's byte data type and in JavaScript it's Int8Array.
    • INTERNAL_BYTE

      public static final BMValueType INTERNAL_BYTE
      Only for internal use not for development purpose. If value is a byte.
  • Method Details

    • values

      public static BMValueType[] 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 BMValueType 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
    • getType

      public byte getType()
    • getInstanceByType

      public static BMValueType getInstanceByType(byte type)
      Parameters:
      type -
      Returns:
      the BMValueType instance by type
      Since:
      2.0.0