Class ArcadeEvaluationResult


  • public class ArcadeEvaluationResult
    extends java.lang.Object
    The result from the successful evaluation of an Arcade Expression.
    Since:
    100.14.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object castTo​(ArcadeExpressionReturnType toType)
      Cast the result of an evaluation to another type using the arcade casting rules.
      boolean equals​(ArcadeEvaluationResult other)
      Tests if two ArcadeEvaluationResult objects are equal.
      java.lang.Object getResult()
      Gets the result of a successful evaluation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getResult

        public java.lang.Object getResult()
        Gets the result of a successful evaluation.
        Returns:
        the result of a successful evaluation, or null if none
        Since:
        100.14.0
      • castTo

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

        Attempts to cast to the required type using the arcade casting rules. Arcade does not throw exceptions when its casting fails, instead it returns a null value, or NaN in the case of casting to a number.

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

        public boolean equals​(ArcadeEvaluationResult other)
        Tests if two ArcadeEvaluationResult objects are equal.

        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 this ArcadeEvaluationResult and the other ArcadeEvaluationResult are equivalent, false if they are not
        Since:
        100.14.0