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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classDeprecated, for removal: This API element is subject to removal in a future version.static classDeprecated, for removal: This API element is subject to removal in a future version.static classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic Require.FileCheckerDeprecated, for removal: This API element is subject to removal in a future version.static Require.IntCheckerstatic Require.PathCheckerstatic <T> Require.ArgumentChecker<T>static DurationnonNegative(@Nullable Duration arg) static intnonNegative(String argName, @Nullable Integer number) static DurationnonNegative(String argName, @Nullable Duration arg) static <T> Tstatic <T> Tstatic Durationstatic doublestatic doublestatic intstatic intstatic Durationstatic voidprecondition(boolean condition, String message, Object... args) static Require.FileStateCheckerDeprecated, for removal: This API element is subject to removal in a future version.static Require.PathStateCheckerstatic <T> Require.StateChecker<T>static voidstateCondition(boolean state, String message, Object... args)
-
Method Details
-
precondition
-
nonNull
-
nonNull
-
argument
-
nonNegative
-
nonNegative
-
positive
-
positive
-
nonNegative
-
positive
-
positive
-
positive
-
positive
-
argument
-
argument
@Deprecated(forRemoval=true) public static Require.FileChecker argument(String argName, @Nullable File file) Deprecated, for removal: This API element is subject to removal in a future version. -
argument
-
stateCondition
-
state
-
state
@Deprecated(forRemoval=true) public static Require.FileStateChecker state(String name, @Nullable File file) Deprecated, for removal: This API element is subject to removal in a future version. -
state
-