|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.NullConstants
public final class NullConstants
This class contains some constants (like a NULL_STRING) as constant. It can be statically imported.
| Field Summary | |
|---|---|
static Date |
NULL_DATE
You need a null date and don't want to use null? |
static Throwable |
NULL_EXCEPTION
You need a null exception and don't want to use null? |
static File |
NULL_FILE
You need a null file and don't want to use null? |
static Object |
NULL_OBJECT
If you have a method with a list of arguments where some arguments are optional you can provide the method with different signatures (good idea, but not always feasible) admit null arguments and handle it in the methode (not a good idea because it can happen accidentally) use this special NULL_OBJECT object to mark an argument as optional Unfortunately this works only for object as argument. |
static String |
NULL_STRING
You need a null string and don't want to use null? |
static Throwable |
NULL_THROWABLE
You need a null throwable and don't want to use null? |
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object NULL_OBJECT
NULL_STRINGpublic static final String NULL_STRING
if (name == NULL_STRING) ...
public static final File NULL_FILE
if (name == NULL_STRING) ...
public static final Throwable NULL_THROWABLE
if (name == NULL_THROWABLE) ...
public static final Throwable NULL_EXCEPTION
if (name == NULL_EXCEPTION) ...
public static final Date NULL_DATE
if (name == NULL_DATE) ...The NULL_DATE is defined here as 1.1.1970 (the epoch).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||