public final class EmptyResponseProcessor<T extends Output<T>> extends Object implements ResponseProcessor<T>
ResponseProcessor
that always emits an empty optional.
This class is designed to be used when loading columnar datasets which will never have a response (e.g., for clustering or anomaly detection).
It still requires an output factory, even though it's never used to generate an output, because the output factory provides the type for the columnar infrastructure.
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_NAME |
Constructor and Description |
---|
EmptyResponseProcessor(OutputFactory<T> outputFactory)
Constructs a response processor which never emits a response.
|
Modifier and Type | Method and Description |
---|---|
String |
getFieldName()
Gets the field name this ResponseProcessor uses.
|
OutputFactory<T> |
getOutputFactory()
Gets the OutputFactory this ResponseProcessor uses.
|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
Optional<T> |
process(String value)
This method always returns
Optional.empty() . |
void |
setFieldName(String fieldName)
Deprecated.
|
String |
toString() |
public static final String FIELD_NAME
public EmptyResponseProcessor(OutputFactory<T> outputFactory)
It contains an output factory as this types the whole columnar infrastructure.
outputFactory
- The output factory to use.public OutputFactory<T> getOutputFactory()
ResponseProcessor
getOutputFactory
in interface ResponseProcessor<T extends Output<T>>
public String getFieldName()
ResponseProcessor
getFieldName
in interface ResponseProcessor<T extends Output<T>>
@Deprecated public void setFieldName(String fieldName)
setFieldName
in interface ResponseProcessor<T extends Output<T>>
fieldName
- The field name.public Optional<T> process(String value)
Optional.empty()
.process
in interface ResponseProcessor<T extends Output<T>>
value
- The value to process.Optional.empty()
.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.