net.intelie.pipes.CompilationResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pipes-api Show documentation
Show all versions of pipes-api Show documentation
Intelie Pipes' API classes and interfaces
package net.intelie.pipes;
import java.util.Objects;
public class CompilationResult {
private final Object result;
private final Function function;
public CompilationResult(Object result, Function function) {
this.result = result;
this.function = function;
}
public Object result() {
return result;
}
public Function function() {
return function;
}
@Override
public String toString() {
return "compiled <" + function.description() + "> into <" + result + ">";
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CompilationResult that = (CompilationResult) o;
return Objects.equals(result, that.result) &&
Objects.equals(function, that.function);
}
@Override
public int hashCode() {
return Objects.hash(result, function);
}
}