Enum Class ArcadeExpressionReturnType

java.lang.Object
java.lang.Enum<ArcadeExpressionReturnType>
com.esri.arcgisruntime.arcade.ArcadeExpressionReturnType
All Implemented Interfaces:
Serializable, Comparable<ArcadeExpressionReturnType>, Constable

public enum ArcadeExpressionReturnType extends Enum<ArcadeExpressionReturnType>
The expected type of the result calculated by an expression described within an ArcadeExpression.
Since:
100.11.0
  • Enum Constant Details

    • AUTOMATIC

      public static final ArcadeExpressionReturnType AUTOMATIC
      The return type of the expression will be automatically determined based on the script calculation.

      The return type is determined by the return value of the script. Different paths through the script might result in different result types. For example, depending on input values, it might return a number, a string, a date, or an array.

      Since:
      100.11.0
    • NUMBER

      public static final ArcadeExpressionReturnType NUMBER
      The return type is expected to be a floating-point number.

      Arcade will convert the return type to a double via the following transformations:

      • booleans return 1 if true, 0 otherwise.
      • integral types are converted to double. This may be a narrowing conversion.
      • double values are returned unchanged.
      • null is converted to 0.
      • strings are parsed as double.
      • all other types are converted to NaN.
      Since:
      100.11.0
    • STRING

      public static final ArcadeExpressionReturnType STRING
      The return type is expected to be a string.

      Arcade will convert the return type to a string via the Arcade Text() function.

      Since:
      100.11.0
    • DICTIONARY

      public static final ArcadeExpressionReturnType DICTIONARY
      The return type is expected to be a dictionary of key/value pairs.

      Arcade will convert the return type to a dictionary of key/value pairs via the following transformations:

      • dictionaries are returned unchanged.
      • all other types are converted to null.
      Since:
      100.12.0
    • ANY

      public static final ArcadeExpressionReturnType ANY
      The return type is expected to be any of the other ArcadeExpressionReturnType types.

      'any' implies that the application evaluating the expression will need to check the result for its type and use the value appropriately.

      Since:
      100.13.0
    • BOOLEAN

      public static final ArcadeExpressionReturnType BOOLEAN
      The return type is expected to be a boolean value of true or false.

      Arcade will convert the return type to a boolean via the following transformations:

      • booleans are returned unchanged.
      • numbers are true if not equal to 0 or NaN, false otherwise.
      • strings are true if a lower-case comparison is equal to 'true', false otherwise.
      • all other types are false.
      Since:
      100.13.0
    • DATE

      public static final ArcadeExpressionReturnType DATE
      The return type is expected to be a Calendar value.

      Arcade converts the return type to a Calendar via the following transformations:

      • Calendar objects are returned unchanged.
      • LocalDate objects are converted by assuming the time is midnight.
      • OffsetDateTime objects are converted to match local time.
      • strings are parsed if they match the ISO 8601 format, YYYY-MM-DDTHH:MM:SS.
      • all other types are converted to null.
      Since:
      200.4.0
    • DATE_ONLY

      public static final ArcadeExpressionReturnType DATE_ONLY
      The return type is expected to be a LocalDate value.

      Arcade converts the return type to a LocalDate via the following transformations:

      • LocalDate objects are returned unchanged.
      • Calendar objects are converted by removing their time component.
      • OffsetDateTime objects are converted by removing their time component and offset.
      • strings are parsed if they match the ISO 8601 format, YYYY-MM-DD.
      • all other types are converted to null.
      Since:
      200.4.0
    • TIME_ONLY

      public static final ArcadeExpressionReturnType TIME_ONLY
      The return type is expected to be a LocalTime value.

      Arcade converts the return type to a LocalTime via the following transformations:

      • LocalTime objects are returned unchanged.
      • Calendar objects are converted by removing their date component.
      • OffsetDateTime objects are converted by removing their date component and offset.
      • strings are parsed if they match the ISO 8601 format, HH:MM:SS.
      • all other types are converted to null.
      Since:
      200.4.0
    • TIMESTAMP_OFFSET

      public static final ArcadeExpressionReturnType TIMESTAMP_OFFSET
      The return type is expected to be a OffsetDateTime value.

      Arcade converts the return type to a TimestampOffset via the following transformations:

      • TimestampOffset objects are returned unchanged.
      • Calendar objects display their offset from UTC based on their timezone.
      • LocalDate objects are converted assuming the time is midnight with no offset from UTC.
      • strings are parsed if they match the ISO 8601 format, YYYY-MM-DDTHH:MM:SS[+/-]HH::MM.
      • all other types are converted to null.
      Since:
      200.4.0
  • Method Details

    • values

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