ArcGIS Runtime SDK for iOS: AGSArcadeExpression Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSArcadeExpression Class Reference

Description

An Arcade expression object, containing an expression, a name, a return type and a title.

An ArcadeExpression object gathers an Arcade script expression together with:

  • The expected return type
  • The name that a map author uses to refer to it
  • The title that the author uses to describe the expression
    Since
    100.11
Inheritance diagram for AGSArcadeExpression:
AGSObject <AGSJSONSerializable>

Instance Methods

(instancetype) - initWithExpression:
 
(instancetype) - initWithExpression:title:name:
 
(instancetype) - initWithExpression:title:name:returnType:
 
(BOOL) - isEqualToArcadeExpression:
 
(nullable id) - toJSON:
 

Class Methods

(instancetype) + arcadeExpressionWithExpression:
 
(instancetype) + arcadeExpressionWithExpression:title:name:
 
(instancetype) + arcadeExpressionWithExpression:title:name:returnType:
 
(nullable id< AGSJSONSerializable >) + fromJSON:error:
 

Properties

NSString * expression
 
NSString * name
 
AGSArcadeExpressionReturnType returnType
 
NSString * title
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

◆ arcadeExpressionWithExpression:

+ (instancetype) arcadeExpressionWithExpression: (NSString *)  expression

Creates a new Arcade expression object with an expression script.

The AGSArcadeExpression::name and AGSArcadeExpression::title properties will default to empty strings. The AGSArcadeExpression::returnType property will default to AGSArcadeExpressionReturnTypeAutomatic.

Parameters
expressionThe Arcade expression to be evaluated.
Since
100.11

◆ arcadeExpressionWithExpression:title:name:

+ (instancetype) arcadeExpressionWithExpression: (NSString *)  expression
title: (NSString *)  title
name: (NSString *)  name 

Creates a new Arcade expression object.

The AGSArcadeExpression::returnType property will default to AGSArcadeExpressionReturnTypeAutomatic.

Parameters
expressionThe Arcade expression to be evaluated.
titleThe title of the expression.
nameThe name of the expression.
Since
100.11

◆ arcadeExpressionWithExpression:title:name:returnType:

+ (instancetype) arcadeExpressionWithExpression: (NSString *)  expression
title: (NSString *)  title
name: (NSString *)  name
returnType: (AGSArcadeExpressionReturnType returnType 

Creates a new Arcade expression object.

Parameters
expressionThe Arcade expression to be evaluated.
titleThe title of the expression.
nameThe name of the expression.
returnTypeThe type to cast the evaluated value to.
Since
100.11

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ initWithExpression:

- (instancetype) initWithExpression: (NSString *)  expression

Creates a new Arcade expression object with an expression script.

The AGSArcadeExpression::name and AGSArcadeExpression::title properties will default to empty strings. The AGSArcadeExpression::returnType property will default to AGSArcadeExpressionReturnTypeAutomatic.

Parameters
expressionThe Arcade expression to be evaluated.
Since
100.11

◆ initWithExpression:title:name:

- (instancetype) initWithExpression: (NSString *)  expression
title: (NSString *)  title
name: (NSString *)  name 

Creates a new Arcade expression object.

The AGSArcadeExpression::returnType property will default to AGSArcadeExpressionReturnTypeAutomatic.

Parameters
expressionThe Arcade expression to be evaluated.
titleThe title of the expression.
nameThe name of the expression.
Since
100.11

◆ initWithExpression:title:name:returnType:

- (instancetype) initWithExpression: (NSString *)  expression
title: (NSString *)  title
name: (NSString *)  name
returnType: (AGSArcadeExpressionReturnType returnType 

Creates a new Arcade expression object.

Parameters
expressionThe Arcade expression to be evaluated.
titleThe title of the expression.
nameThe name of the expression.
returnTypeThe type to cast the evaluated value to.
Since
100.11

◆ isEqualToArcadeExpression:

- (BOOL) isEqualToArcadeExpression: (AGSArcadeExpression *)  other

Tests if two Arcade expression objects are equal.

Parameters
otherThe second object.
Returns
YES if this AGSArcadeExpression and the other AGSArcadeExpression objects are equivalent, NO if they are not.
Since
100.11

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

◆ expression

- (NSString*) expression
readnonatomiccopy

The Arcade expression string.

Since
100.11

◆ name

- (NSString*) name
readnonatomiccopy

The name that the author uses to refer to the expression.

If not set explicitly, then the default is an empty name string.

Since
100.11

◆ returnType

- (AGSArcadeExpressionReturnType) returnType
readnonatomicassign

The expected return type of the expression.

If the Arcade expression creates results of a different type (e.g. a date or an array) then the result will be cast to the expected return type. If no sensible cast can be carried out, then the result will be nil.

Since
100.11

◆ title

- (NSString*) title
readnonatomiccopy

The title that the author uses to describe the expression.

If not set explicitly, then the default is an empty title string.

Since
100.11

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100