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

org.ggp.base.util.gdl.grammar.GdlNot Maven / Gradle / Ivy

There is a newer version: 0.0.15
Show newest version
package org.ggp.base.util.gdl.grammar;

public final class GdlNot extends GdlLiteral
{
    private static final long serialVersionUID = 1L;

    private final GdlLiteral body;
    private transient Boolean ground;

    GdlNot(GdlLiteral body)
    {
        this.body = body;
        ground = null;
    }

    public GdlLiteral getBody()
    {
        return body;
    }

    @Override
    public boolean isGround()
    {
        if (ground == null)
        {
            ground = body.isGround();
        }

        return ground;
    }

    @Override
    public String toString()
    {
        return "( not " + body + " )";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy