Class Question.Score.Builder
java.lang.Object
com.google.adk.classifiers.Question.Score.Builder
- Enclosing class:
Question.Score
Builder for
Question.Score.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Question.Scorebuild()Builds the question.final Question.Score.BuilderSets plain-text descriptions, one per rubric level starting at 0; a score needs at least two.abstract Question.Score.Buildercriteria(List<? extends ClassifierContent> criteria) Sets the description of each rubric level, starting at level 0.abstract Question.Score.Builderinstructions(@Nullable ClassifierContent instructions) final Question.Score.Builderinstructions(String instructions) Sets plain-text instructions; to clear them, pass null toinstructions(ClassifierContent).
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instructions
@CanIgnoreReturnValue public abstract Question.Score.Builder instructions(@Nullable ClassifierContent instructions) -
instructions
Sets plain-text instructions; to clear them, pass null toinstructions(ClassifierContent). -
criteria
@CanIgnoreReturnValue public abstract Question.Score.Builder criteria(List<? extends ClassifierContent> criteria) Sets the description of each rubric level, starting at level 0. -
criteria
@CanIgnoreReturnValue public final Question.Score.Builder criteria(String first, String second, String... rest) Sets plain-text descriptions, one per rubric level starting at 0; a score needs at least two. -
build
Builds the question.- Throws:
IllegalStateException- if the criteria are not setIllegalArgumentException- if there are fewer than two levels
-