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

org.qbicc.graph.UnaryValue Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
package org.qbicc.graph;

import org.qbicc.type.ValueType;

/**
 * Unary operations.
 */
public interface UnaryValue extends Value {
    Value getInput();

    default ValueType getType() {
        return getInput().getType();
    }

    default boolean isConstant() {
        return getInput().isConstant();
    }

    default int getValueDependencyCount() {
        return 1;
    }

    default Value getValueDependency(int index) throws IndexOutOfBoundsException {
        return index == 0 ? getInput() : Util.throwIndexOutOfBounds(index);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy