1 package com.github.davidmoten.util;
2
3 public final class Preconditions {
4
5 public static void checkNotNull(Object o) {
6 checkNotNull(o, null);
7 }
8
9 public static void checkNotNull(Object o, String message) {
10 if (o == null)
11 throw new NullPointerException(message);
12 }
13
14 public static void checkArgument(boolean b, String message) {
15 if (!b)
16 throw new IllegalArgumentException(message);
17 }
18
19 }