Class CreateClassifierOptions.Builder

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

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

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

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

    • build

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

      public CreateClassifierOptions.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 CreateClassifierOptions builder
    • name

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

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

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

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

      public CreateClassifierOptions.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 CreateClassifierOptions builder
      Throws:
      FileNotFoundException - if the file could not be found
    • negativeExamples

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