Package adams.gui.core
Class BaseObjectTextField.BaseObjectCheckModel<T extends BaseObject>
- java.lang.Object
-
- adams.gui.core.CheckedTextField.AbstractCheckModel
-
- adams.gui.core.BaseObjectTextField.BaseObjectCheckModel<T>
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- BaseObjectTextField<T extends BaseObject>
public static class BaseObjectTextField.BaseObjectCheckModel<T extends BaseObject> extends CheckedTextField.AbstractCheckModel
A model for checking regexp values.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected T
m_Check
the object used for the checks.-
Fields inherited from class adams.gui.core.CheckedTextField.AbstractCheckModel
m_DefaultValue
-
-
Constructor Summary
Constructors Constructor Description BaseObjectCheckModel(T check)
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getCheck()
Returns the base object instance used for checking.boolean
isValid(String text)
Checks whether the content is valid.T
newObject(String text)
Instantiates a new object with the given text.-
Methods inherited from class adams.gui.core.CheckedTextField.AbstractCheckModel
getDefaultValue, setDefaultValue, toString
-
-
-
-
Field Detail
-
m_Check
protected T extends BaseObject m_Check
the object used for the checks.
-
-
Constructor Detail
-
BaseObjectCheckModel
public BaseObjectCheckModel(T check)
Initializes the model.- Parameters:
check
- the object to use for performing the checks
-
-
Method Detail
-
isValid
public boolean isValid(String text)
Checks whether the content is valid.- Specified by:
isValid
in classCheckedTextField.AbstractCheckModel
- Parameters:
text
- the string to check- Returns:
- true if valid
-
newObject
public T newObject(String text)
Instantiates a new object with the given text.- Parameters:
text
- the text to use (only if valid)- Returns:
- the generated object
-
getCheck
public T getCheck()
Returns the base object instance used for checking.- Returns:
- the instance
-
-