home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Java / allaire / util / Assert.class (.txt) next >
Encoding:
Java Class File  |  1999-04-12  |  701 b   |  32 lines

  1. package allaire.util;
  2.  
  3. public class Assert {
  4.    public static void fail(String var0) throws IllegalArgumentException {
  5.       notFalse(false, var0);
  6.    }
  7.  
  8.    public static void notNull(Object var0) throws IllegalArgumentException {
  9.       if (var0 == null) {
  10.          throw new IllegalArgumentException("null argument");
  11.       }
  12.    }
  13.  
  14.    public static void notNull(Object var0, String var1) throws IllegalArgumentException {
  15.       if (var0 == null) {
  16.          throw new IllegalArgumentException(var1);
  17.       }
  18.    }
  19.  
  20.    public static void notFalse(boolean var0) throws IllegalArgumentException {
  21.       if (!var0) {
  22.          throw new IllegalArgumentException("boolean expression false");
  23.       }
  24.    }
  25.  
  26.    public static void notFalse(boolean var0, String var1) throws IllegalArgumentException {
  27.       if (!var0) {
  28.          throw new IllegalArgumentException(var1);
  29.       }
  30.    }
  31. }
  32.