Top Description Constructors Methods
io.vertx.core.impl

public Class Arguments

extends Object
Class Inheritance

Helper class to perform extended checks on arguments analogous to java.util.Objects#requireNonNull(Object, String).

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
require(boolean
condition which must be fulfilled
condition
,
String
detail message to be used in the event that a IllegalArgumentException is thrown
message
)

Checks that the specified condition is fulfilled and throws a customized IllegalArgumentException if it is false.

public static void
requireInRange(int
value to check
number
,
int
minimum allowed value
min
,
int
maximum allowed value
max
,
String
detail message to be used in the event that a IllegalArgumentException is thrown
message
)

Checks that the specified number is within the specified minimum and maximum range (inclusively) and throws a customized IllegalArgumentException if not.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Argumentsback to summary
public Arguments()

Method Detail

requireback to summary
public static void require(boolean condition, String message)

Checks that the specified condition is fulfilled and throws a customized IllegalArgumentException if it is false.

Parameters
condition:boolean

condition which must be fulfilled

message:String

detail message to be used in the event that a IllegalArgumentException is thrown

requireInRangeback to summary
public static void requireInRange(int number, int min, int max, String message)

Checks that the specified number is within the specified minimum and maximum range (inclusively) and throws a customized IllegalArgumentException if not.

Parameters
number:int

value to check

min:int

minimum allowed value

max:int

maximum allowed value

message:String

detail message to be used in the event that a IllegalArgumentException is thrown