Errai 3.0.1-SNAPSHOT

org.jboss.errai.common.client.api
Class Assert

java.lang.Object
  extended by org.jboss.errai.common.client.api.Assert

public class Assert
extends Object

Non-instantiable utility for self-checking code.

Author:
Christian Sadilek , Jonathan Fuerth , Mike Brock

Method Summary
static
<V> V
notNull(String errorMessage, V value)
          Throws NullPointerException if the value is null with an error message.
static
<V> V
notNull(V value)
          Throws NullPointerException if the value 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 <V> V notNull(String errorMessage,
                            V value)
Throws NullPointerException if the value is null with an error message.

Type Parameters:
V -
Parameters:
errorMessage - an error message to be displayed as part of the NullPointerException thrown.
value - the value that must not be null
Returns:
Throws:
NullPointerException - if value is null.

notNull

public static <V> V notNull(V value)
Throws NullPointerException if the value is null.

Type Parameters:
V -
Parameters:
value - the value that must not be null
Returns:
Throws:
NullPointerException - if value is null.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.