@Test public void testCheckArgument() { try { int i = -1; Preconditions.checkArgument(i >= 0, "Argument was %s but expected nonnegative", i); } catch (Exception e) { } try { int i = -1; Preconditions.checkArgument(i >= 0); } catch (Exception e) { } try { int i = -1; Preconditions.checkArgument(i >= 0, "Argument expected nonnegative"); } catch (Exception e) { } }
public static void checkArgument(boolean expression) { if (!expression) { throw new IllegalArgumentException(); } }
Preconditions { public static void checkArgument(boolean expression) { if (!expression) { throw new IllegalArgumentException(); } } }
Preconditions { public static void checkArgument(boolean expression) { if (!expression) { throw new IllegalArgumentException(); } } private  Preconditions(); }
Preconditions { public static void checkArgument(boolean expression) { if (!expression) { throw new IllegalArgumentException(); } } private  Preconditions(); static void checkArgument(boolean expression); static void checkArgument(boolean expression, Object errorMessage); static void checkArgument(boolean expression, String errorMessageTemplate,
            Object... errorMessageArgs); static void checkState(boolean expression); static void checkState(boolean expression, Object errorMessage); static void checkState(boolean expression, String errorMessageTemplate,
            Object... errorMessageArgs); static T checkNotNull(T reference); static T checkNotNull(T reference, Object errorMessage); static T checkNotNull(T reference, String errorMessageTemplate,
            Object... errorMessageArgs); static T checkDeserializeNotNull(T reference); }
Preconditions { public static void checkArgument(boolean expression) { if (!expression) { throw new IllegalArgumentException(); } } private  Preconditions(); static void checkArgument(boolean expression); static void checkArgument(boolean expression, Object errorMessage); static void checkArgument(boolean expression, String errorMessageTemplate,
            Object... errorMessageArgs); static void checkState(boolean expression); static void checkState(boolean expression, Object errorMessage); static void checkState(boolean expression, String errorMessageTemplate,
            Object... errorMessageArgs); static T checkNotNull(T reference); static T checkNotNull(T reference, Object errorMessage); static T checkNotNull(T reference, String errorMessageTemplate,
            Object... errorMessageArgs); static T checkDeserializeNotNull(T reference);  }