Enum IntentParameterType

java.lang.Object
java.lang.Enum<IntentParameterType>
com.codename1.intents.IntentParameterType
All Implemented Interfaces:
Comparable<IntentParameterType>

public enum IntentParameterType extends Enum<IntentParameterType>

The parameter kinds an intent can accept.

The set is closed on purpose. Every entry has to survive being spoken aloud, typed into the Shortcuts app, filled by a language model, and carried across a platform boundary as text -- so it is the intersection of what iOS, Android and a JSON payload can all express, not the union.

  • Enum Constant Details

    • STRING

      public static final IntentParameterType STRING
      Free text, or a closed vocabulary when the declaration lists options.
    • INTEGER

      public static final IntentParameterType INTEGER
      A whole number. Maps to Java int and long.
    • NUMBER

      public static final IntentParameterType NUMBER
      A fractional number. Maps to Java float and double.
    • BOOLEAN

      public static final IntentParameterType BOOLEAN
      A yes/no value the platform can ask for directly.
    • DATE

      public static final IntentParameterType DATE
      An instant. Crosses the boundary as epoch milliseconds so no locale or timezone parsing sits in the wire format.
    • ENTITY

      public static final IntentParameterType ENTITY
      An app-defined noun declared with com.codename1.annotations.IntentEntity. Crosses the boundary as the entity's id string and is resolved back to an object by the generated BY_ID query. This is the type that lets the platform run its own picker before the handler is ever called.
  • Method Details

    • values

      public static IntentParameterType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static IntentParameterType 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