public final class Defaults extends Object
Defaults class.
Modifier and Type | Method and Description |
---|---|
static <T> T |
defaultValue(Class<T> type)
Returns the default value of
type as defined by JLS --- 0 for
numbers, false for boolean and '\0' for char . |
public static <T> T defaultValue(Class<T> type)
type
as defined by JLS --- 0
for
numbers, false
for boolean
and '\0'
for char
. For
non-primitive types and void
, null
is returned.T
- a T object.type
- a Class
object.Copyright © 2011–2019. All rights reserved.