The list of methods to do Object to Float are organized into topic(s).
float
castToFloat(final double v) Cast Double to Float.
if ((v < Float.MIN_VALUE) || (v > Float.MAX_VALUE)) {
throw new ArithmeticException("Double value is out of Float range: " + v);
return (float) v;
Float
objectToFloat(Object o) Convert an object to a Float.
if (o == null) {
return null;
if (o instanceof Float) {
return (Float) o;
try {
return Float.valueOf(o.toString());
...
int
objectToInt(Object o) object To Int
if (o instanceof Number)
return ((Number) o).intValue();
try {
if (o == null)
return -1;
else
return Integer.parseInt(o.toString());
} catch (NumberFormatException e) {
...
int
objectToInt(Object o) object To Int
if (o instanceof String) {
return Integer.parseInt((String) o);
} else if (o instanceof Integer) {
return ((Integer) o).intValue();
} else {
throw new Exception("Invalid option value " + o);
int
objectToInt(Object obj) object To Int
if (null == obj) {
return 0;
try {
if (obj instanceof String) {
return Integer.parseInt((String) obj);
} else if (obj instanceof Integer) {
return (Integer) obj;
...
int
objectToInt(Object p1) object To Int
if (p1 == null) {
return 0;
if (p1 instanceof Character) {
return (int) ((Character) p1).charValue();
return ((Number) p1).intValue();