java.lang.Object
ushiosan.jvm.internal.validators.UObjectValidators
- Direct Known Subclasses:
UObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UPair<Class<?>,UFun.UFun1<Boolean, Object>>[] Object pairs used to check that objects are null -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> booleanMethod to validate an object multiple times and that all the conditions are correct or incorrect depending on the "inverted" parameter.static <T> booleanvalidateNotNull(T object, boolean inverted, Predicate<T> @NotNull ... predicates) Method to validate an object multiple times and that all the conditions are correct or incorrect depending on the "inverted" parameter.
-
Field Details
-
NULLABLE_VALIDATORS
Object pairs used to check that objects are null
-
-
Constructor Details
-
UObjectValidators
public UObjectValidators()
-
-
Method Details
-
validate
@SafeVarargs public static <T> boolean validate(@Nullable T object, boolean inverted, Predicate<T> @NotNull ... predicates) Method to validate an object multiple times and that all the conditions are correct or incorrect depending on the "inverted" parameter.- Type Parameters:
T- the type of object you want to scan- Parameters:
object- the object to be analyzedinverted- option used to check the reverse process of the filterspredicates- all the filters that you want to apply to the object- Returns:
trueif all conditions were valid orfalseotherwise.
-
validateNotNull
@SafeVarargs public static <T> boolean validateNotNull(@NotNull T object, boolean inverted, Predicate<T> @NotNull ... predicates) Method to validate an object multiple times and that all the conditions are correct or incorrect depending on the "inverted" parameter.- Type Parameters:
T- the type of object you want to scan- Parameters:
object- the object to be analyzedinverted- option used to check the reverse process of the filterspredicates- all the filters that you want to apply to the object- Returns:
trueif all conditions were valid orfalseotherwise.
-