org.otfeed.protocol.request
Class Check

java.lang.Object
  extended by org.otfeed.protocol.request.Check

public final class Check
extends java.lang.Object

Helper class to validate parameters.


Method Summary
static void isTrue(boolean predicate, java.lang.String message)
           
static void notNull(java.lang.Object obj, java.lang.String name)
          Throws NullPointerException with the appropriate message if obj parameter is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

notNull

public static void notNull(java.lang.Object obj,
                           java.lang.String name)
Throws NullPointerException with the appropriate message if obj parameter is null.

Parameters:
obj - object to check.
name - name of the object to display as part of the exception message.

isTrue

public static void isTrue(boolean predicate,
                          java.lang.String message)


Copyright © 2007 Mike Kroutikov. All Rights Reserved.