173 |
} |
} |
174 |
|
|
175 |
/** |
/** |
176 |
|
* Returns a <code>Double</code> object wrapping the value. |
177 |
|
* In contrast to the <code>Double</code> constructor, this method |
178 |
|
* may cache some values. It is used by boxing conversion. |
179 |
|
* |
180 |
|
* @param val the value to wrap |
181 |
|
* @return the <code>Double</code> |
182 |
|
* |
183 |
|
* @since 1.5 |
184 |
|
*/ |
185 |
|
public static Double valueOf(double val) |
186 |
|
{ |
187 |
|
// We don't actually cache, but we could. |
188 |
|
return new Double(val); |
189 |
|
} |
190 |
|
|
191 |
|
/** |
192 |
* Create a new <code>Double</code> object using the <code>String</code>. |
* Create a new <code>Double</code> object using the <code>String</code>. |
193 |
* |
* |
194 |
* @param s the <code>String</code> to convert |
* @param s the <code>String</code> to convert |