Package schule.ngb.zm.util
Class Validator
java.lang.Object
schule.ngb.zm.util.Validator
Statische Methoden, um Methodenparameter auf Gültigkeit zu prüfen.
-
Method Summary
Modifier and TypeMethodDescriptionstatic final double
requireInRange
(double i, double min, double max) static final double
requireInRange
(double i, double min, double max, CharSequence msg) static final double
requireInRange
(double i, double min, double max, Supplier<String> msg) static final int
requireInRange
(int i, int min, int max) static final int
requireInRange
(int i, int min, int max, CharSequence msg) static final int
requireInRange
(int i, int min, int max, Supplier<String> msg) static final String
requireNotEmpty
(String str, CharSequence paramName) static final String
requireNotEmpty
(String str, CharSequence paramName, CharSequence msg) static final String
requireNotEmpty
(String str, Supplier<String> msg) static final <T> T[]
requireNotEmpty
(T[] arr, CharSequence paramName) static final <T> T[]
requireNotEmpty
(T[] arr, CharSequence paramName, CharSequence msg) static final <T> T[]
requireNotEmpty
(T[] arr, Supplier<String> msg) static final double
requireNotNegative
(double i) static final double
requireNotNegative
(double i, CharSequence msg) static final double
requireNotNegative
(double i, Supplier<String> msg) static final int
requireNotNegative
(int i) static final int
requireNotNegative
(int i, CharSequence msg) static final int
requireNotNegative
(int i, Supplier<String> msg) static final <T> T
requireNotNull
(T obj, CharSequence paramName) static final <T> T
requireNotNull
(T obj, CharSequence paramName, CharSequence msg) static final <T> T
requireNotNull
(T obj, Supplier<String> msg) static final double
requirePositive
(double i) static final double
requirePositive
(double i, CharSequence msg) static final double
requirePositive
(double i, Supplier<String> msg) static final int
requirePositive
(int i) static final int
requirePositive
(int i, CharSequence msg) static final int
requirePositive
(int i, Supplier<String> msg) static final <T> T[]
requireSize
(T[] arr, int size) static final <T> T[]
requireSize
(T[] arr, int size, CharSequence msg) static final <T> T[]
requireSize
(T[] arr, int size, Supplier<String> msg)
-
Method Details
-
requireNotNull
-
requireNotNull
-
requireNotNull
-
requireNotEmpty
-
requireNotEmpty
-
requireNotEmpty
-
requireNotEmpty
-
requireNotEmpty
-
requireNotEmpty
-
requirePositive
public static final int requirePositive(int i) -
requirePositive
-
requirePositive
-
requireNotNegative
public static final int requireNotNegative(int i) -
requireNotNegative
-
requireNotNegative
-
requireInRange
public static final int requireInRange(int i, int min, int max) -
requireInRange
-
requireInRange
-
requirePositive
public static final double requirePositive(double i) -
requirePositive
-
requirePositive
-
requireNotNegative
public static final double requireNotNegative(double i) -
requireNotNegative
-
requireNotNegative
-
requireInRange
public static final double requireInRange(double i, double min, double max) -
requireInRange
-
requireInRange
-
requireSize
public static final <T> T[] requireSize(T[] arr, int size) -
requireSize
-
requireSize
-