Class ArcadeEvaluationResult

java.lang.Object
com.esri.arcgisruntime.arcade.ArcadeEvaluationResult

public class ArcadeEvaluationResult extends Object
The result from the successful evaluation of an Arcade expression.
Since:
100.14.0
  • Method Details

    • getResult

      public Object getResult()
      Gets the result of a successful evaluation.

      May take one of the following types:

      Returns:
      the result of a successful evaluation, or null if none
      Since:
      100.14.0
    • castTo

      public Object castTo(ArcadeExpressionReturnType toType)
      Cast the result of an evaluation to another type using the Arcade casting rules.

      Use to ensure that the final return value from a script is cast to an expected type in an Arcade-consistent manner. For more information on the casting behavior for each type, see ArcadeExpressionReturnType. Only types to which a value can be cast are available in ArcadeExpressionReturnType. Other types, such as GeoElement, should be accessed via the result property. An exception is not thrown when casting fails. Instead, an error is returned whose value depends on the type of cast attempted.

      Parameters:
      toType - the type to cast to
      Returns:
      an object of the requested type or null
      Throws:
      IllegalArgumentException - if toType is null
      Since:
      100.14.0
    • equals

      public boolean equals(ArcadeEvaluationResult other)
      Tests if this object is equal to a second ArcadeEvaluationResult object.

      This is a deep comparison so two separate dictionaries with the same keys and values will compare equal.

      Parameters:
      other - the second object
      Returns:
      true if the comparison succeeds and the objects are equal, false otherwise
      Since:
      100.14.0