All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.cypher.ast.model.CypherArrayAccess Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.cypher.ast.model;

import java.util.stream.Stream;

public class CypherArrayAccess extends CypherAstBase {
    private final CypherAstBase arrayExpression;
    private final CypherAstBase indexExpression;

    public CypherArrayAccess(CypherAstBase arrayExpression, CypherAstBase indexExpression) {
        this.arrayExpression = arrayExpression;
        this.indexExpression = indexExpression;
    }

    public CypherAstBase getArrayExpression() {
        return arrayExpression;
    }

    public CypherAstBase getIndexExpression() {
        return indexExpression;
    }

    @Override
    public String toString() {
        return String.format("%s[%s]", getArrayExpression(), getIndexExpression());
    }

    @Override
    public Stream getChildren() {
        return Stream.of(arrayExpression, indexExpression);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy