Class UpdateClassifierOptions.Builder

java.lang.Object
com.ibm.watson.visual_recognition.v3.model.UpdateClassifierOptions.Builder
Enclosing class:
UpdateClassifierOptions

public static class UpdateClassifierOptions.Builder
extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String classifierId)
      Instantiates a new builder with required properties.
      Parameters:
      classifierId - the classifierId
  • Method Details

    • build

      public UpdateClassifierOptions build()
      Builds a UpdateClassifierOptions.
      Returns:
      the new UpdateClassifierOptions instance
    • addPositiveExamples

      public UpdateClassifierOptions.Builder addPositiveExamples​(String classname, InputStream positiveExamples)
      Adds an entry to the positiveExamples map.
      Parameters:
      classname - the key associated with the map entry to be added
      positiveExamples - the value associated with the map entry to be added
      Returns:
      the UpdateClassifierOptions builder
    • classifierId

      public UpdateClassifierOptions.Builder classifierId​(String classifierId)
      Set the classifierId.
      Parameters:
      classifierId - the classifierId
      Returns:
      the UpdateClassifierOptions builder
    • positiveExamples

      public UpdateClassifierOptions.Builder positiveExamples​(Map<String,​InputStream> positiveExamples)
      Set the positiveExamples. Existing positiveExamples map will be replaced.
      Parameters:
      positiveExamples - the positiveExamples
      Returns:
      the UpdateClassifierOptions builder
    • negativeExamples

      public UpdateClassifierOptions.Builder negativeExamples​(InputStream negativeExamples)
      Set the negativeExamples.
      Parameters:
      negativeExamples - the negativeExamples
      Returns:
      the UpdateClassifierOptions builder
    • negativeExamplesFilename

      public UpdateClassifierOptions.Builder negativeExamplesFilename​(String negativeExamplesFilename)
      Set the negativeExamplesFilename.
      Parameters:
      negativeExamplesFilename - the negativeExamplesFilename
      Returns:
      the UpdateClassifierOptions builder
    • addPositiveExamples

      public UpdateClassifierOptions.Builder addPositiveExamples​(String classname, File positiveExamples) throws FileNotFoundException
      Adds an entry to the positiveExamples map.
      Parameters:
      classname - the key associated with the map entry to be added
      positiveExamples - the value associated with the map entry to be added
      Returns:
      the UpdateClassifierOptions builder
      Throws:
      FileNotFoundException - if the file could not be found
    • negativeExamples

      public UpdateClassifierOptions.Builder negativeExamples​(File negativeExamples) throws FileNotFoundException
      Set the negativeExamples.
      Parameters:
      negativeExamples - the negativeExamples
      Returns:
      the UpdateClassifierOptions builder
      Throws:
      FileNotFoundException - if the file could not be found