Package com.google.common.base
Class Defaults
java.lang.Object
com.google.common.base.Defaults
This class provides default values for all Java types, as defined by the JLS.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
defaultValue
(Class<T> type) Returns the default value oftype
as defined by JLS ---0
for numbers,false
forboolean
and'\0'
forchar
.
-
Field Details
-
DOUBLE_DEFAULT
-
FLOAT_DEFAULT
-
-
Constructor Details
-
Defaults
private Defaults()
-
-
Method Details
-
defaultValue
Returns the default value oftype
as defined by JLS ---0
for numbers,false
forboolean
and'\0'
forchar
. For non-primitive types andvoid
,null
is returned.
-