Class UObjectValidators

java.lang.Object
ushiosan.jvm.internal.validators.UObjectValidators
Direct Known Subclasses:
UObject

public abstract class UObjectValidators extends Object
  • Field Details

  • 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 analyzed
      inverted - option used to check the reverse process of the filters
      predicates - all the filters that you want to apply to the object
      Returns:
      true if all conditions were valid or false otherwise.
    • 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 analyzed
      inverted - option used to check the reverse process of the filters
      predicates - all the filters that you want to apply to the object
      Returns:
      true if all conditions were valid or false otherwise.