com.linkedin.dagli.dag.AbstractDAGResult9 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
DAG-oriented machine learning framework for bug-resistant, readable, efficient, maintainable and trivially deployable models in Java and other JVM languages
// AUTOGENERATED CODE. DO NOT MODIFY DIRECTLY! Instead, please modify the dag/AbstractDAGResultX.ftl file.
// See the README in the module's src/template directory for details.
package com.linkedin.dagli.dag;
import com.linkedin.dagli.objectio.ObjectReader;
import com.linkedin.dagli.objectio.WrappedObjectReader;
import java.util.Objects;
import com.linkedin.dagli.tuple.Tuple9;
import com.linkedin.dagli.objectio.tuple.TupleReader;
/**
* Base class for an object encapsulating the results of executing a DAG.
*
* @param the type of result #1 of the DAG
* @param the type of result #2 of the DAG
* @param the type of result #3 of the DAG
* @param the type of result #4 of the DAG
* @param the type of result #5 of the DAG
* @param the type of result #6 of the DAG
* @param the type of result #7 of the DAG
* @param the type of result #8 of the DAG
* @param the type of result #9 of the DAG
*/
abstract class AbstractDAGResult9 extends
WrappedObjectReader> implements
DAGResult9, AutoCloseable {
private final ObjectReader _result1;
private final ObjectReader _result2;
private final ObjectReader _result3;
private final ObjectReader _result4;
private final ObjectReader _result5;
private final ObjectReader _result6;
private final ObjectReader _result7;
private final ObjectReader _result8;
private final ObjectReader _result9;
@Override
public ObjectReader getResult1() {
return _result1;
}
@Override
public ObjectReader getResult2() {
return _result2;
}
@Override
public ObjectReader getResult3() {
return _result3;
}
@Override
public ObjectReader getResult4() {
return _result4;
}
@Override
public ObjectReader getResult5() {
return _result5;
}
@Override
public ObjectReader getResult6() {
return _result6;
}
@Override
public ObjectReader getResult7() {
return _result7;
}
@Override
public ObjectReader getResult8() {
return _result8;
}
@Override
public ObjectReader getResult9() {
return _result9;
}
/**
* Create a new DAG result instance from the provided array of {@link ObjectReader}s.
*
* @param results an array of length 9 providing an {@link ObjectReader} for each of the DAG's outputs.
*/
@SuppressWarnings("unchecked")
AbstractDAGResult9(ObjectReader>[] results) {
this((ObjectReader) results[0], (ObjectReader) results[1], (ObjectReader) results[2],
(ObjectReader) results[3], (ObjectReader) results[4], (ObjectReader) results[5],
(ObjectReader) results[6], (ObjectReader) results[7], (ObjectReader) results[8]);
assert results.length == 9;
}
/**
* Create a new DAG result instance from the provided {@link ObjectReader}s.
*
* @param results1 an {@link ObjectReader} for the DAG's first output.
* @param results2 an {@link ObjectReader} for the DAG's second output.
* @param results3 an {@link ObjectReader} for the DAG's third output.
* @param results4 an {@link ObjectReader} for the DAG's fourth output.
* @param results5 an {@link ObjectReader} for the DAG's fifth output.
* @param results6 an {@link ObjectReader} for the DAG's sixth output.
* @param results7 an {@link ObjectReader} for the DAG's seventh output.
* @param results8 an {@link ObjectReader} for the DAG's eighth output.
* @param results9 an {@link ObjectReader} for the DAG's ninth output.
*/
AbstractDAGResult9(ObjectReader results1, ObjectReader results2, ObjectReader results3,
ObjectReader results4, ObjectReader results5, ObjectReader results6, ObjectReader results7,
ObjectReader results8, ObjectReader results9) {
super(new TupleReader<>(results1, results2, results3, results4, results5, results6, results7, results8, results9));
_result1 = Objects.requireNonNull(results1);
_result2 = Objects.requireNonNull(results2);
_result3 = Objects.requireNonNull(results3);
_result4 = Objects.requireNonNull(results4);
_result5 = Objects.requireNonNull(results5);
_result6 = Objects.requireNonNull(results6);
_result7 = Objects.requireNonNull(results7);
_result8 = Objects.requireNonNull(results8);
_result9 = Objects.requireNonNull(results9);
}
@Override
public void close() {
_result1.close();
_result2.close();
_result3.close();
_result4.close();
_result5.close();
_result6.close();
_result7.close();
_result8.close();
_result9.close();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy