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

org.ggp.base.util.propnet.architecture.components.Not Maven / Gradle / Ivy

There is a newer version: 0.0.15
Show newest version
package org.ggp.base.util.propnet.architecture.components;

import org.ggp.base.util.propnet.architecture.Component;

/**
 * The Not class is designed to represent logical NOT gates.
 */
@SuppressWarnings("serial")
public final class Not extends Component
{
    /**
     * Returns the inverse of the input to the not.
     *
     * @see org.ggp.base.util.propnet.architecture.Component#getValue()
     */
    @Override
    public boolean getValue()
    {
        return !getSingleInput().getValue();
    }

    /**
     * @see org.ggp.base.util.propnet.architecture.Component#toString()
     */
    @Override
    public String toString()
    {
        return toDot("invtriangle", "grey", "NOT");
    }

    @Override
    public String getShortName() {
        return "not(" + getSingleInput().getShortName() + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy