java.lang.Object
dev.eidentification.bankid.internal.Precondition

public final class Precondition extends Object
  • Method Details

    • nonNull

      public static <T> void nonNull(@Nullable T subject, Supplier<String> messageSupplier)
      Checks if the provided subject is not null. If it is null, a NullPointerException is thrown with the message provided by the messageSupplier.
      Type Parameters:
      T - the type of the subject
      Parameters:
      subject - the subject to check for null
      messageSupplier - a supplier for the exception message
      Throws:
      NullPointerException - if the subject is null