public class CustomForm extends AForm
DEFAULT_TRANSLATOR, translator| Constructor and Description |
|---|
CustomForm(java.lang.String title,
AFormElement... elements) |
| Modifier and Type | Method and Description |
|---|---|
static CustomFormBuilder |
builder() |
void |
deserializeResponse(java.lang.String response)
Deserialize the response of the form from a string.
|
AFormElement[] |
getElements() |
java.lang.String |
serializeResponse()
Serialize the response of the form to a string.
|
void |
setTranslator(java.util.function.Function<java.lang.String,java.lang.String> translator)
Set the translator for the form.
|
getTitle, getTitle, getTranslator, getTypepublic CustomForm(@Nonnull
java.lang.String title,
AFormElement... elements)
title - The title of the formelements - The elements of the formpublic static CustomFormBuilder builder()
public void setTranslator(@Nonnull
java.util.function.Function<java.lang.String,java.lang.String> translator)
AFormsetTranslator in class AFormtranslator - The translator@Nonnull public AFormElement[] getElements()
public java.lang.String serializeResponse()
AFormserializeResponse in class AFormpublic void deserializeResponse(java.lang.String response)
throws com.google.gson.JsonParseException
deserializeResponse in class AFormresponse - The serialized responsecom.google.gson.JsonParseException - If the response is not a valid json array