com.hammingweight.hammock
Class DefaultValues

java.lang.Object
  extended by com.hammingweight.hammock.DefaultValues

public class DefaultValues
extends java.lang.Object

The DefaultValues class provides a utility method for providing default instances of Java's wrapper classes. For example, the default instance of the Boolean is Boolean(false).

Since:
Hammock 1.6
Author:
C.A. Meijer

Constructor Summary
DefaultValues()
           
 
Method Summary
static java.lang.Object getDefaultValue(java.lang.Class clazz)
          Returns a default object corresponding to a specified Java wrapper class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultValues

public DefaultValues()
Method Detail

getDefaultValue

public static java.lang.Object getDefaultValue(java.lang.Class clazz)
Returns a default object corresponding to a specified Java wrapper class.

Parameters:
clazz - A wrapper class.
Returns:
A default instance for a wrapper class. null if the class is not a wrapper class.