org.codeartisans.java.toolbox.exceptions
Class NullArgumentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by org.codeartisans.java.toolbox.exceptions.NullArgumentException
All Implemented Interfaces:
Serializable

public final class NullArgumentException
extends IllegalArgumentException

See Also:
Serialized Form

Method Summary
static void ensureNotEmpty(String name, boolean trim, String value)
           
static void ensureNotEmpty(String name, CharSequence value)
           
static void ensureNotEmpty(String name, Collection<?> value)
           
static void ensureNotEmpty(String name, Map<?,?> value)
           
static void ensureNotEmpty(String name, Object[] value)
           
static void ensureNotEmpty(String name, Properties value)
           
static void ensureNotEmpty(String name, String value)
           
static void ensureNotEmptyContent(String name, boolean trim, String[] value)
          Ensures that the string array instance is not null and that it has entries that are not null or empty.
static void ensureNotEmptyContent(String name, String[] value)
          Ensures that the string array instance is not null and that it has entries that are not null or empty either without trimming the string.
static void ensureNotNull(String name, Object value)
           
static void ensureNotZero(String name, Integer value)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

ensureNotNull

public static void ensureNotNull(String name,
                                 Object value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  String value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  CharSequence value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  boolean trim,
                                  String value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  Object[] value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  Collection<?> value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  Properties value)

ensureNotEmpty

public static void ensureNotEmpty(String name,
                                  Map<?,?> value)
                           throws NullArgumentException
Throws:
NullArgumentException

ensureNotEmptyContent

public static void ensureNotEmptyContent(String name,
                                         String[] value)
Ensures that the string array instance is not null and that it has entries that are not null or empty either without trimming the string.


ensureNotEmptyContent

public static void ensureNotEmptyContent(String name,
                                         boolean trim,
                                         String[] value)
Ensures that the string array instance is not null and that it has entries that are not null or empty.


ensureNotZero

public static void ensureNotZero(String name,
                                 Integer value)


Copyright © 2010. All Rights Reserved.