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

org.openprovenance.prov.template.emitter.minilanguage.ConstantInteger Maven / Gradle / Ivy

The newest version!
package org.openprovenance.prov.template.emitter.minilanguage;

import org.openprovenance.prov.template.emitter.Element;
import org.openprovenance.prov.template.emitter.minilanguage.emitters.Python;

import java.util.List;

public class ConstantInteger extends Expression {
    private final Integer integer;

    public ConstantInteger(Integer integer, List elements) {
        super(elements);
        this.integer = integer;
    }

    @Override
    public String toString() {
        return "ConstantInteger{" +
                "integer='" + integer + '\'' +
                '}';
    }

    public void emit(Python emitter, List classVariables, List instanceVariables) {
        emit(emitter, false,  classVariables, instanceVariables);
    }

    public void emit(Python emitter, boolean continueLine, List classVariables, List instanceVariables) {
        emitter.emitLine( ""+integer ,continueLine);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy