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

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

The newest version!
package org.ggp.base.util.propnet.architecture.components;

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

/**
 * The Transition class is designed to represent pass-through gates.
 */
@SuppressWarnings("serial")
public final class Transition extends Component
{
    /**
     * Returns the value of the input to the transition.
     *
     * @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("box", "grey", "TRANSITION");
    }

    @Override
    public String getShortName() {
        if (getOutputs().isEmpty()) {
            return "empty transition";
        } else {
            return "next(" + getSingleOutput().getShortName() + ")";
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy