public class Util extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkParameter(boolean condition,
Object errorMessage)
Checks the given boolean condition, and throws an
ProgramParametrizationException if
the condition is not met (evaluates to false ). |
public static void checkParameter(boolean condition, @Nullable Object errorMessage)
ProgramParametrizationException
if
the condition is not met (evaluates to false
). The exception will have the
given error message.condition
- The condition to checkerrorMessage
- The message for the ProgramParametrizationException
that is thrown if the check fails.ProgramParametrizationException
- Thrown, if the condition is violated.Preconditions.checkNotNull(Object, String)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.