Guard Class
- java.
lang. Object - com.
microsoft. azure. elasticdb. core. commons. transientfaulthandling. Guard
- com.
public class Guard
Implements the common guard methods.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
argumentNotGreaterThan(double argumentValue, double ceilingValue, String argumentName)
Checks an argument to ensure that its value doesn't exceed the specified ceiling baseline. |
void |
argumentNotNegativeValue(int argumentValue, String argumentName)
Checks an argument to ensure that its 32-bit signed value isn't negative. |
void |
argumentNotNegativeValue(long argumentValue, String argumentName)
Checks an argument to ensure that its 64-bit signed value isn't negative. |
boolean |
argumentNotNull(Object argumentValue, String argumentName)
Checks an argument to ensure that it isn't null. |
boolean |
argumentNotNullOrEmptyString(String argumentValue, String argumentName)
Checks a string argument to ensure that it isn't null or empty. |
Method Details
argumentNotGreaterThan
public static void argumentNotGreaterThan(double argumentValue, double ceilingValue, String argumentName)
Checks an argument to ensure that its value doesn't exceed the specified ceiling baseline.
Parameters:
argumentNotNegativeValue
public static void argumentNotNegativeValue(int argumentValue, String argumentName)
Checks an argument to ensure that its 32-bit signed value isn't negative.
Parameters:
argumentNotNegativeValue
public static void argumentNotNegativeValue(long argumentValue, String argumentName)
Checks an argument to ensure that its 64-bit signed value isn't negative.
Parameters:
argumentNotNull
public static boolean argumentNotNull(Object argumentValue, String argumentName)
Checks an argument to ensure that it isn't null.
Parameters:
Returns:
argumentNotNullOrEmptyString
public static boolean argumentNotNullOrEmptyString(String argumentValue, String argumentName)
Checks a string argument to ensure that it isn't null or empty.
Parameters:
Returns: