org.appng.api.model

## Enum Property.Type

- java.lang.Object
- - java.lang.Enum<Property.Type>
  - - org.appng.api.model.Property.Type

- All Implemented Interfaces:
    Serializable, Comparable<Property.Type>
  Enclosing interface:
    Property

      public static enum Property.Type
      extends Enum<Property.Type>

  The type of a `Property`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BOOLEAN`
    `DECIMAL`
    `INT`
    `MULTILINE`
    `PASSWORD`
    `TEXT`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Property.Type` | `forObject(Object value)` Returns the best matching type for the given object.
    `static Property.Type` | `forString(String value)` Finds the best matching type for the given input string
    `static boolean` | `isValidValue(Property.Type type, String value)` Checks if the given input value is a valid string representation according to the given type.
    `static Property.Type` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Property.Type[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INT

          public static final Property.Type INT

    - #### DECIMAL

          public static final Property.Type DECIMAL

    - #### BOOLEAN

          public static final Property.Type BOOLEAN

    - #### TEXT

          public static final Property.Type TEXT

    - #### PASSWORD

          public static final Property.Type PASSWORD

    - #### MULTILINE

          public static final Property.Type MULTILINE

  - ### Method Detail

    - #### values

          public static Property.Type[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Property.Type c : Property.Type.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Property.Type valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### forObject

          public static Property.Type forObject(Object value)

      Returns the best matching type for the given object.
      - for `boolean` and `Boolean`, returns `BOOLEAN`
      - for `Integer`,`Long`, `Short` (and their corresponding primitive types) returns `INT`
      - for `Double` and `Float` (and their corresponding primitive types), returns `DECIMAL`
      - for a `String` that contains a linefeed (`\n`), returns `MULTILINE`
      - for everything else, return `TEXT`
      Parameters:
        `value` - the object
      Returns:
        the best matching type for the given object

    - #### isValidValue

          public static boolean isValidValue(Property.Type type,
                                             String value)

      Checks if the given input value is a valid string representation according to the given type.
      Parameters:
        `type` - the type
        `value` - the input value
      Returns:
        `true` if the value is a valid string representation, `false otherwise`

    - #### forString

          public static Property.Type forString(String value)

      Finds the best matching type for the given input string
      Parameters:
        `value` - the input string
      Returns:
        the type

Copyright © 2011–2023 aiticon GmbH. All rights reserved.