com.linkedin.dagli.placeholder.internal.PlaceholderInternalAPI 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
package com.linkedin.dagli.placeholder.internal;
import com.linkedin.dagli.producer.internal.RootProducerInternalAPI;
import com.linkedin.dagli.placeholder.Placeholder;
import java.util.ArrayList;
import java.util.List;
/**
* Base interface for internal APIs of {@link Placeholder}s.
* @param the type of value supplied by the {@link Placeholder}
* @param the type of the {@link Placeholder}
*/
public interface PlaceholderInternalAPI> extends RootProducerInternalAPI {
/**
* Returns a list of new placeholders.
*
* @param count the number of placeholders to creat
* @return the list of new placeholders
*/
static List> createPlaceholderList(int count) {
ArrayList> placeholders = new ArrayList<>(count);
for (int i = 1; i <= count; i++) {
placeholders.add(new Placeholder<>("Placeholder #" + i));
}
return placeholders;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy