Class Example.Builder

java.lang.Object
dev.dokimos.core.Example.Builder
Enclosing class:
Example

public static class Example.Builder extends Object
Builder for constructing examples with multiple inputs and outputs.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • input

      public Example.Builder input(String key, Object value)
      Adds an input with the given key and value.
      Parameters:
      key - the input key
      value - the input value
      Returns:
      this builder
    • expectedOutput

      public Example.Builder expectedOutput(String key, Object value)
      Adds an expected output with the given key and value.
      Parameters:
      key - the output key
      value - the output value
      Returns:
      this builder
    • metadata

      public Example.Builder metadata(String key, Object value)
      Adds metadata with the given key and value.
      Parameters:
      key - the metadata key
      value - the metadata value
      Returns:
      this builder
    • inputs

      public Example.Builder inputs(Map<String,Object> inputs)
      Adds all entries from the given inputs map.
      Parameters:
      inputs - the inputs to add
      Returns:
      this builder
    • expectedOutputs

      public Example.Builder expectedOutputs(Map<String,Object> expectedOutputs)
      Adds all entries from the given expected outputs map.
      Parameters:
      expectedOutputs - the expected outputs to add
      Returns:
      this builder
    • metadata

      public Example.Builder metadata(Map<String,Object> metadata)
      Adds all entries from the given metadata map.
      Parameters:
      metadata - the metadata to add
      Returns:
      this builder
    • build

      public Example build()