Package org.apache.guacamole.form
Class TextField
- java.lang.Object
-
- org.apache.guacamole.form.Field
-
- org.apache.guacamole.form.TextField
-
public class TextField extends Field
Represents a basic text field. The field may generally contain any data, but may not contain multiple lines.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.guacamole.form.Field
Field.Type
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
parse(String str)
Parses the given string, interpreting empty strings as equivalent to null.-
Methods inherited from class org.apache.guacamole.form.Field
getName, getOptions, getType, setName, setOptions, setType
-
-
-
-
Constructor Detail
-
TextField
public TextField(String name)
Creates a new TextField with the given name.- Parameters:
name
- The unique name to associate with this field.
-
TextField
public TextField(String name, Collection<String> options)
Creates a new TextField with the given name and possible values. As a text field may contain any data by definition, any provided options are simply known-good values.- Parameters:
name
- The unique name to associate with this field.options
- A set of known legal options for this field.
-
-
Method Detail
-
parse
public static String parse(String str)
Parses the given string, interpreting empty strings as equivalent to null. For all other cases, the given string is returned verbatim.- Parameters:
str
- The string to parse, which may be null.- Returns:
- The given string, or null if the given string was null or empty.
-
-