Class Preconditions

java.lang.Object
com.luna.common.check.Preconditions

public class Preconditions extends Object
  • Constructor Details

    • Preconditions

      public Preconditions()
  • Method Details

    • check

      public static void check(boolean expression, ResultEnum error)
      校验表达式是否正确
      Parameters:
      expression -
      error - FxErrorCode枚举
    • checkExpression

      public static void checkExpression(boolean expression, String msg)
    • checkExpression

      public static void checkExpression(boolean expression, ResultEnum resultEnum)
    • checkNotNull

      public static <T> T checkNotNull(T reference, String errorMessage)
    • checkNotNull

      public static <T> T checkNotNull(T reference, ResultEnum bizErrorEnum)
    • checkParamNotNull

      public static <T> T checkParamNotNull(T reference)
    • triggerException

      public static void triggerException(String message)