/** * This method throw an IllegalStateException if the given parameter is null * * @param valueToCheck the value to check * @param msg the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfNull(final Object valueToCheck, final String msg) { Misc.badStateIfTrue(valueToCheck == null, msg); }
/** * This method throw an IllegalStateException if the given parameter is not * null * * @param valueToCheck the value to check * @param msg the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfNotNull(final Object valueToCheck, final String msg) { Misc.badStateIfTrue(valueToCheck != null, msg); }
/** * This method throw an IllegalStateException if the given parameter is false * * @param valueToCheck * the value to check * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfFalse(final boolean valueToCheck, final String msg) { Misc.badStateIfTrue(!valueToCheck, msg); }
/** * This method throw an IllegalStateException if the given parameter is not null * * @param valueToCheck * the value to check * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfNotNull(final Object valueToCheck, final String msg) { Misc.badStateIfTrue(valueToCheck != null, msg); }
/** * This method throw an IllegalStateException if the given parameter is false * * @param valueToCheck * the value to check * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfFalse(final boolean valueToCheck, final String msg) { Misc.badStateIfTrue(!valueToCheck, msg); }
/** * This method throw an IllegalStateException if the given parameter is false * * @param valueToCheck the value to check * @param msg the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfFalse(final boolean valueToCheck, final String msg) { Misc.badStateIfTrue(!valueToCheck, msg); }
/** * This method throw an IllegalStateException if the given parameter is null * * @param valueToCheck * the value to check * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfNull(final Object valueToCheck, final String msg) { Misc.badStateIfTrue(valueToCheck == null, msg); }
/** * This method throw an IllegalStateException if the given parameter is null * * @param valueToCheck * the value to check * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfNull(final Object valueToCheck, final String msg) { Misc.badStateIfTrue(valueToCheck == null, msg); }
/** * This method throw an IllegalStateException if the given parameter is not null * * @param valueToCheck * the value to check * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfNotNull(final Object valueToCheck, final String msg) { Misc.badStateIfTrue(valueToCheck != null, msg); }
/** * This method throw an IllegalStateException if the given parameters are * equals (using {@link Object#equals(Object)} * * @param a the first object * @param b the second object * @param msg the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfEquals(final Object a, final Object b, final String msg) { Misc.badStateIfTrue(a.equals(b), msg); }
/** * This method throw an IllegalStateException if the given parameters are equals (using {@link Object#equals(Object)} * * @param a * the first object * @param b * the second object * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfEquals(final Object a, final Object b, final String msg) { Misc.badStateIfTrue(a.equals(b), msg); }
/** * This method throw an IllegalStateException if the given parameters are equals (using {@link Object#equals(Object)} * * @param a * the first object * @param b * the second object * @param msg * the message for the thrown exception * * @see IllegalStateException */ public static void badStateIfEquals(final Object a, final Object b, final String msg) { Misc.badStateIfTrue(a.equals(b), msg); }
public MultiInstantiatorDescriptor(int joinNumber, List<Object> variableValues) { Misc.checkArgsNotNull(joinNumber, variableValues); Misc.badStateIfTrue(joinNumber <= 0, "The join number must be greater than 0"); Misc.badStateIfTrue(joinNumber > variableValues.size(), "The join number must be lesser than the number of variable values"); this.joinNumber = joinNumber; this.variableValues = variableValues; }
public MultiInstantiatorDescriptor(final int joinNumber, final List<Object> variableValues) { Misc.checkArgsNotNull(variableValues); String message = ExceptionManager.getInstance().getFullMessage("ba_MID_1"); Misc.badStateIfTrue(joinNumber <= 0, message); message = ExceptionManager.getInstance().getFullMessage("ba_MID_2"); Misc.badStateIfTrue(joinNumber > variableValues.size(), message); this.joinNumber = joinNumber; this.variableValues = variableValues; }
public MultiInstantiatorDescriptor(final int joinNumber, final List<Object> variableValues) { Misc.checkArgsNotNull(variableValues); String message = ExceptionManager.getInstance().getFullMessage("ba_MID_1"); Misc.badStateIfTrue(joinNumber <= 0, message); message = ExceptionManager.getInstance().getFullMessage("ba_MID_2"); Misc.badStateIfTrue(joinNumber > variableValues.size(), message); this.joinNumber = joinNumber; this.variableValues = variableValues; }