01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.terracotta.session.util;
05:
06: public class Assert {
07:
08: public static void pre(boolean v) {
09: if (!v)
10: throw new AssertionError("Precondition Failed");
11: }
12:
13: public static void post(boolean v) {
14: if (!v)
15: throw new AssertionError("Postcondition Failed");
16: }
17:
18: public static void inv(boolean v) {
19: if (!v)
20: throw new AssertionError("Invariant Failed");
21: }
22:
23: }
|