Package team.unnamed.mocha.parser.ast
Class ArrayAccessExpression
java.lang.Object
team.unnamed.mocha.parser.ast.ArrayAccessExpression
- All Implemented Interfaces:
Expression
Array accessing expression implementation, access to a value in
an array, by its index.
Example array accessing expressions: my_geometries[0],
array.my_geometries[query.anim_time], array.my_geos[math.cos(90)]
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Expressionarray()Gets the 'array' expression, the index is evaluated on this expression's result.voidarray(@NotNull Expression array) Sets the 'array' expression, the index is evaluated on this expression's result.booleaninthashCode()@NotNull Expressionindex()Gets the 'index' expression, the index is evaluated on this expression's result.voidindex(@NotNull Expression index) Sets the 'index' expression, the index is evaluated on this expression's result.@NotNull StringtoString()<R> Rvisit(@NotNull ExpressionVisitor<R> visitor) Visits this expression with the given visitor.
-
Constructor Details
-
ArrayAccessExpression
public ArrayAccessExpression(@NotNull @NotNull Expression array, @NotNull @NotNull Expression index)
-
-
Method Details
-
array
Gets the 'array' expression, the index is evaluated on this expression's result.- Returns:
- The array expression.
- Since:
- 3.0.0
-
array
Sets the 'array' expression, the index is evaluated on this expression's result.- Parameters:
array- The new array expression.- Since:
- 3.0.0
-
index
Gets the 'index' expression, the index is evaluated on this expression's result.- Returns:
- The index expression.
- Since:
- 3.0.0
-
index
Sets the 'index' expression, the index is evaluated on this expression's result.- Parameters:
index- The new index expression.- Since:
- 3.0.0
-
visit
Description copied from interface:ExpressionVisits this expression with the given visitor.- Specified by:
visitin interfaceExpression- Type Parameters:
R- The visit result return type- Parameters:
visitor- The expression visitor- Returns:
- The visit result
-
toString
-
equals
-
hashCode
public int hashCode()
-