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 Summary
-
Method Summary
Modifier and Type Method Description UpdateClassifierOptions.Builder
addPositiveExamples(String classname, File positiveExamples)
Adds an entry to the positiveExamples map.UpdateClassifierOptions.Builder
addPositiveExamples(String classname, InputStream positiveExamples)
Adds an entry to the positiveExamples map.UpdateClassifierOptions
build()
Builds a UpdateClassifierOptions.UpdateClassifierOptions.Builder
classifierId(String classifierId)
Set the classifierId.UpdateClassifierOptions.Builder
negativeExamples(File negativeExamples)
Set the negativeExamples.UpdateClassifierOptions.Builder
negativeExamples(InputStream negativeExamples)
Set the negativeExamples.UpdateClassifierOptions.Builder
negativeExamplesFilename(String negativeExamplesFilename)
Set the negativeExamplesFilename.UpdateClassifierOptions.Builder
positiveExamples(Map<String,InputStream> positiveExamples)
Set the positiveExamples.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
classifierId
- the classifierId
-
-
Method Details
-
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 addedpositiveExamples
- the value associated with the map entry to be added- Returns:
- the UpdateClassifierOptions builder
-
classifierId
Set the classifierId.- Parameters:
classifierId
- the classifierId- Returns:
- the UpdateClassifierOptions builder
-
positiveExamples
Set the positiveExamples. Existing positiveExamples map will be replaced.- Parameters:
positiveExamples
- the positiveExamples- Returns:
- the UpdateClassifierOptions builder
-
negativeExamples
Set the negativeExamples.- Parameters:
negativeExamples
- the negativeExamples- Returns:
- the UpdateClassifierOptions builder
-
negativeExamplesFilename
Set the negativeExamplesFilename.- Parameters:
negativeExamplesFilename
- the negativeExamplesFilename- Returns:
- the UpdateClassifierOptions builder
-
addPositiveExamples
public UpdateClassifierOptions.Builder addPositiveExamples(String classname, File positiveExamples) throws FileNotFoundExceptionAdds an entry to the positiveExamples map.- Parameters:
classname
- the key associated with the map entry to be addedpositiveExamples
- 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 FileNotFoundExceptionSet the negativeExamples.- Parameters:
negativeExamples
- the negativeExamples- Returns:
- the UpdateClassifierOptions builder
- Throws:
FileNotFoundException
- if the file could not be found
-