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