Class IndexExpression
java.lang.Object
software.amazon.smithy.jmespath.JmespathExpression
software.amazon.smithy.jmespath.ast.IndexExpression
Gets a specific element by zero-based index.
Use a negative index to get an element from the end of the array
(e.g., -1 is used to get the last element of the array). If an
array element does not exist, a null
value is returned.
- See Also:
-
Constructor Details
-
IndexExpression
public IndexExpression(int index) -
IndexExpression
public IndexExpression(int index, int line, int column)
-
-
Method Details
-
accept
Description copied from class:JmespathExpression
Visits a node using a double-dispatch visitor.- Specified by:
accept
in classJmespathExpression
- Type Parameters:
T
- Type of value the visitor returns.- Parameters:
visitor
- Visitor to accept on the node.- Returns:
- Returns the result of applying the visitor.
-
getIndex
public int getIndex()Gets the index to retrieve.- Returns:
- Returns the index.
-
equals
-
hashCode
public int hashCode() -
toString
-