| 905 | } |
| 906 | |
| 907 | private static float toFloat(Object o) { |
| 908 | if (o instanceof Float) return (Float) o; |
| 909 | if (o instanceof Double) return ((Double) o).floatValue(); |
| 910 | if (o instanceof Long) return ((Long) o).floatValue(); |
| 911 | if (o instanceof Integer) return ((Integer) o).floatValue(); |
| 912 | if (o instanceof BigDecimal) return ((BigDecimal) o).floatValue(); |
| 913 | if (o instanceof String) return Float.parseFloat((String) o); |
| 914 | return Float.parseFloat(String.valueOf(o)); |
| 915 | } |
| 916 | |
| 917 | public static String replace(Object baseString, Object search, Object replacement) { |
| 918 | if (baseString == null) { |