javadoc.com.google.common.base.Defaults.html Maven / Gradle / Ivy
The newest version!
Defaults (Guava: Google Core Libraries for Java 11.0.1 API)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
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.
- Author:
- Ben Yu
Method Summary | ||
---|---|---|
static
|
defaultValue(Class<T> type)
Returns the default value of type as defined by JLS --- 0 for numbers, false for boolean and '\0' for char . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
defaultValue
public static <T> T defaultValue(Class<T> type)
- Returns the default value of
type
as defined by JLS ---0
for numbers,false
forboolean
and'\0'
forchar
. For non-primitive types andvoid
, null is returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010-2012. All Rights Reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy