Package org.openqa.selenium.internal
Class Require
java.lang.Object
org.openqa.selenium.internal.Require
A utility class to check arguments (preconditions) and state.
Examples of use:
public void setActionWithTimeout(Action action delegate, int timeout) { this.action = Require.nonNull("Action", action); this.timeout = Require.positive("Timeout", timeout); }
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Deprecated, for removal: This API element is subject to removal in a future version.static class
Deprecated, for removal: This API element is subject to removal in a future version.static class
static class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic Require.FileChecker
Deprecated, for removal: This API element is subject to removal in a future version.static Require.IntChecker
static Require.PathChecker
static <T> Require.ArgumentChecker<T>
static int
nonNegative
(String argName, Integer number) static Duration
nonNegative
(String argName, Duration arg) static Duration
nonNegative
(Duration arg) static <T> T
static <T> T
static double
static double
static int
static int
static Duration
static Duration
static void
precondition
(boolean condition, String message, Object... args) static Require.FileStateChecker
Deprecated, for removal: This API element is subject to removal in a future version.static Require.PathStateChecker
static <T> Require.StateChecker<T>
static void
stateCondition
(boolean state, String message, Object... args)
-
Method Details
-
precondition
-
nonNull
-
nonNull
-
argument
-
nonNegative
-
nonNegative
-
positive
-
positive
-
nonNegative
-
positive
-
positive
-
positive
-
positive
-
argument
-
argument
Deprecated, for removal: This API element is subject to removal in a future version. -
argument
-
stateCondition
-
state
-
state
Deprecated, for removal: This API element is subject to removal in a future version. -
state
-