sk.baka.tools
Class Checks

java.lang.Object
  extended by sk.baka.tools.Checks

public final class Checks
extends Object

Contains various check methods.

Author:
Martin Vysny

Method Summary
static void checkArg(String strCondition, boolean condition)
          Checks that method argument holds given precondition.
static void checkNotBlank(String name, String value)
          Asserts that given parameter is not #isBlank(String).
static void checkNotNull(String name, Object value)
          Asserts that given parameter is not null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkArg

public static void checkArg(String strCondition,
                            boolean condition)
Checks that method argument holds given precondition.

Parameters:
strCondition - the textual form of the condition, e.g. "count>=0"
condition - the condition. If false then IllegalArgumentException is thrown.

checkNotNull

public static void checkNotNull(String name,
                                Object value)
Asserts that given parameter is not null.

Parameters:
name - the parameter name
value - the parameter value

checkNotBlank

public static void checkNotBlank(String name,
                                 String value)
Asserts that given parameter is not #isBlank(String).

Parameters:
name - the parameter name
value - the parameter value


Copyright © 2009-2010. All Rights Reserved.