Package de.xima.fc.form.renderer
Class JsRegExpCheck
- java.lang.Object
-
- de.xima.fc.form.renderer.JsRegExpCheck
-
-
Constructor Summary
Constructors Constructor Description JsRegExpCheck(Object[] args)
Creates a new regexp check with the given regexp and flags.JsRegExpCheck(String regExp, String... flags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
test(String value)
JsRegExpCheck
withTimeout(long timeout, TimeUnit unit)
Changes the default timeout.
-
-
-
Constructor Detail
-
JsRegExpCheck
public JsRegExpCheck(Object[] args)
Creates a new regexp check with the given regexp and flags.- Parameters:
args
- An array that contains the regexp (String) as the first item, and optional String flags as the second, third, etc. item. Currently onlyi
,g
, andm
flags are supported by the regexp engine.
-
-
Method Detail
-
withTimeout
public JsRegExpCheck withTimeout(long timeout, TimeUnit unit)
Changes the default timeout. When the regexp check takes longer than this timeout, the check is aborted and the regexp is considered not to match the input.- Parameters:
timeout
- Timeout for the regexp check.unit
- Unit of the given timeout value.- Returns:
- A new regexp check with the given timeout.
-
-