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

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

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

import org.qbicc.type.ValueType;

/**
 *
 */
public interface CastValue extends Value {
    Value getInput();

    ValueType getType();

    default int getValueDependencyCount() {
        return 1;
    }

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

    @Override
    default boolean isNullable() {
        // no cast can introduce or discard nullability
        return getInput().isNullable();
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy