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

org.vertexium.cypher.ast.model.CypherArraySlice 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 CypherArraySlice extends CypherAstBase {
    private final CypherAstBase arrayExpression;
    private final CypherAstBase sliceFrom;
    private final CypherAstBase sliceTo;

    public CypherArraySlice(CypherAstBase arrayExpression, CypherAstBase sliceFrom, CypherAstBase sliceTo) {
        this.arrayExpression = arrayExpression;
        this.sliceFrom = sliceFrom;
        this.sliceTo = sliceTo;
    }

    public CypherAstBase getArrayExpression() {
        return arrayExpression;
    }

    public CypherAstBase getSliceFrom() {
        return sliceFrom;
    }

    public CypherAstBase getSliceTo() {
        return sliceTo;
    }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy