Class IndexExpression
- java.lang.Object
- 
- software.amazon.smithy.jmespath.JmespathExpression
- 
- software.amazon.smithy.jmespath.ast.IndexExpression
 
 
- 
 public final class IndexExpression extends JmespathExpression 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 nullvalue is returned.- See Also:
- Index Expressions
 
- 
- 
Constructor SummaryConstructors Constructor Description IndexExpression(int index)IndexExpression(int index, int line, int column)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(ExpressionVisitor<T> visitor)Visits a node using a double-dispatch visitor.booleanequals(java.lang.Object o)intgetIndex()Gets the index to retrieve.inthashCode()java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
acceptpublic <T> T accept(ExpressionVisitor<T> visitor) Description copied from class:JmespathExpressionVisits a node using a double-dispatch visitor.- Specified by:
- acceptin class- JmespathExpression
- 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.
 
 - 
getIndexpublic int getIndex() Gets the index to retrieve.- Returns:
- Returns the index.
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-