public static Float toFloat(Object o,Float defaultValue){
  if (o instanceof Float)   return (Float)o;
  if (defaultValue != null)   return new Float(toFloatValue(o,defaultValue.floatValue()));
  float res=toFloatValue(o,Float.MIN_VALUE);
  if (res == Float.MIN_VALUE)   return defaultValue;
  return new Float(res);
}

public static Float toFloat ( Object o , Float defaultValue ) { if ( o instanceof Float ) return ( Float ) o ; if ( defaultValue != null ) return new Float ( toFloatValue ( o , defaultValue . floatValue ( ) ) ) ; float res = toFloatValue ( o , Float . MIN_VALUE ) ; if ( res == Float . MIN_VALUE ) return defaultValue ; return new Float ( res ) ; }
cast a object to a float object ( reference type )
