Package com.crawljax.forms
Class FormInput
- java.lang.Object
-
- com.crawljax.forms.FormInput
-
public class FormInput extends Object
- Author:
- mesbah
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormInput.InputType
-
Field Summary
Fields Modifier and Type Field Description private Eventableeventableprivate Identificationidentificationprivate Set<InputValue>inputValuesprivate FormInput.InputTypetype
-
Constructor Summary
Constructors Constructor Description FormInput(FormInput.InputType type, Identification identification)FormInput(FormInput.InputType type, Identification identification, String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancontainsInput(Set<FormInput> inputs, Identification identification)booleanequals(Object obj)EventablegetEventable()IdentificationgetIdentification()static FormInputgetInput(Set<FormInput> inputs, Identification identification)Set<InputValue>getInputValues()FormInput.InputTypegetType()static FormInput.InputTypegetTypeFromStr(String type)inthashCode()voidinputValues(boolean... values)Sets the values of this input field.voidinputValues(String... values)voidinputValues(Set<InputValue> inputValues)voidsetEventable(Eventable eventable)StringtoString()
-
-
-
Field Detail
-
type
private FormInput.InputType type
-
identification
private final Identification identification
-
inputValues
private Set<InputValue> inputValues
-
eventable
private Eventable eventable
-
-
Constructor Detail
-
FormInput
public FormInput(FormInput.InputType type, Identification identification)
-
FormInput
public FormInput(FormInput.InputType type, Identification identification, String value)
- Parameters:
type- the type of the input elements (e.g. text, checkbox)identification- the identification.value- the value of the elements. 1 for checked
-
-
Method Detail
-
getTypeFromStr
public static FormInput.InputType getTypeFromStr(String type)
-
containsInput
public static boolean containsInput(Set<FormInput> inputs, Identification identification)
- Parameters:
inputs- form input set.identification- the identification to check.- Returns:
- true if set contains a FormInput that has the same identification.
-
getInput
public static FormInput getInput(Set<FormInput> inputs, Identification identification)
- Parameters:
inputs- form input set.identification- the identification to check.- Returns:
- a FormInput object that has the same identification.
-
getType
public FormInput.InputType getType()
- Returns:
- the input type.
-
getInputValues
public Set<InputValue> getInputValues()
- Returns:
- the inputValues
-
inputValues
public void inputValues(Set<InputValue> inputValues)
- Parameters:
inputValues- the inputValues to set
-
inputValues
public void inputValues(String... values)
-
inputValues
public void inputValues(boolean... values)
Sets the values of this input field. Only Applicable check-boxes and a radio buttons.- Parameters:
values- Values to set.
-
getEventable
public Eventable getEventable()
- Returns:
- the related eventable for submitting
-
setEventable
public void setEventable(Eventable eventable)
- Parameters:
eventable- the eventable by which this FormInput is submitted by
-
getIdentification
public Identification getIdentification()
- Returns:
- the identification
-
-