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

org.vertexium.cypher.ast.model.CypherPatternPart 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 CypherPatternPart extends CypherAstBase {
    private final String name;
    private final CypherListLiteral elementPatterns;

    public CypherPatternPart(String name, CypherListLiteral elementPatterns) {
        this.name = name;
        this.elementPatterns = elementPatterns;
    }

    public String getName() {
        return name;
    }

    public CypherListLiteral getElementPatterns() {
        return elementPatterns;
    }

    @Override
    public String toString() {
        if (getName() != null) {
            return String.format("%s = %s", getName(), getElementPatterns().toString(""));
        } else {
            return getElementPatterns().toString("");
        }
    }

    @Override
    public Stream getChildren() {
        return elementPatterns.stream();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy