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

org.vertexium.cypher.ast.model.CypherPatternComprehension 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 CypherPatternComprehension extends CypherAstBase {
    private final CypherMatchClause matchClause;
    private final CypherAstBase expression;

    public CypherPatternComprehension(
            CypherMatchClause matchClause,
            CypherAstBase expression
    ) {
        this.matchClause = matchClause;
        this.expression = expression;
    }

    public CypherMatchClause getMatchClause() {
        return matchClause;
    }

    public CypherAstBase getExpression() {
        return expression;
    }

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();
        result.append("[");
        result.append(getMatchClause());
        result.append(" | ");
        result.append(getExpression());
        result.append("]");
        return result.toString();
    }

    @Override
    public Stream getChildren() {
        return Stream.of(
                matchClause,
                expression
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy