// Time-stamp: <02 mai 2013 10:16 queinnec@enseeiht.fr> package Synchro; /** À défaut d'un vrai assert... * @see AssertionViolation * * @author Philippe Quéinnec */ public class Assert { /** Lève l'exception AssertionViolation si la * condition b est fausse. */ public static void check (boolean b) { if (! b) throw new AssertionViolation (); } /** Lève l'exception AssertionViolation avec le message * msg si la condition b est fausse. */ public static void check (String msg, boolean b) { if (! b) throw new AssertionViolation (msg); } }