public class CastUtil extends Object
| 构造器和说明 |
|---|
CastUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
castBoolean(Object obj)
转为 boolean 型
|
static boolean |
castBoolean(Object obj,
boolean defaultValue)
转为 boolean 型(提供默认值)
|
static double |
castDouble(Object obj)
转为 double 型
|
static double |
castDouble(Object obj,
double defaultValue)
转为 double 型(提供默认值)
|
static int |
castInt(Object obj)
转为 int 型
|
static int |
castInt(Object obj,
int defaultValue)
转为 int 型(提供默认值)
|
static long |
castLong(Object obj)
转为 long 型
|
static long |
castLong(Object obj,
long defaultValue)
转为 long 型(提供默认值)
|
static String |
castString(Object obj)
转为 String 型
|
static String |
castString(Object obj,
String defaultValue)
转为 String 型(提供默认值)
|
public static double castDouble(Object obj)
public static double castDouble(Object obj, double defaultValue)
public static long castLong(Object obj)
public static long castLong(Object obj, long defaultValue)
public static int castInt(Object obj)
public static int castInt(Object obj, int defaultValue)
public static boolean castBoolean(Object obj)
public static boolean castBoolean(Object obj, boolean defaultValue)
Copyright © 2019. All rights reserved.