public final class Preconditions extends Object
| Modifier and Type | Method and Description | 
|---|---|
static void | 
checkArgument(boolean condition,
             String message,
             Object... parameters)
Throws an  
IllegalArgumentException with formatted message if
 condition is not met. | 
static void | 
checkState(boolean condition,
          String message,
          Object... parameters)
Throws an  
IllegalStateException with formatted message if
 condition is not met. | 
public static void checkState(boolean condition,
              String message,
              Object... parameters)
IllegalStateException with formatted message if
 condition is not met.condition - a boolean condition that must be true to passmessage - text to use as exception messageparameters - optional parameters used in
            String.format(String, Object...)public static void checkArgument(boolean condition,
                 String message,
                 Object... parameters)
IllegalArgumentException with formatted message if
 condition is not met.condition - a boolean condition that must be true to passmessage - text to use as exception messageparameters - optional parameters used in
            String.format(String, Object...)Copyright © 2014. All rights reserved.