Interface ResponseProcessor<T extends Output<T>>

All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
All Known Implementing Classes:
BinaryResponseProcessor, EmptyResponseProcessor, FieldResponseProcessor, QuartileResponseProcessor

public interface ResponseProcessor<T extends Output<T>> extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
An interface that will take the response field and produce an Output.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the field name this ResponseProcessor uses.
    Gets the OutputFactory this ResponseProcessor uses.
    process(String value)
    Returns Optional.empty() if it failed to process out a response.
    void
    setFieldName(String fieldName)
    Deprecated.
    Response processors should be immutable; downstream objects assume that they are Set the field name this ResponseProcessor uses.

    Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable

    postConfig

    Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable

    getProvenance
  • Method Details

    • getOutputFactory

      OutputFactory<T> getOutputFactory()
      Gets the OutputFactory this ResponseProcessor uses.
      Returns:
      The output factory.
    • getFieldName

      String getFieldName()
      Gets the field name this ResponseProcessor uses.
      Returns:
      The field name.
    • setFieldName

      @Deprecated void setFieldName(String fieldName)
      Deprecated.
      Response processors should be immutable; downstream objects assume that they are Set the field name this ResponseProcessor uses.
      Parameters:
      fieldName - The field name.
    • process

      Optional<T> process(String value)
      Returns Optional.empty() if it failed to process out a response.
      Parameters:
      value - The value to process.
      Returns:
      The response value if found.