Commit b2fbbf56 by Michael Koch Committed by Michael Koch

NumberFormat.java: Sorted imports.

2003-12-19  Michael Koch  <konqueror@gmx.de>

	* java/text/NumberFormat.java: Sorted imports.
	(getCurrency): New method.
	(setCurrency): New method.

From-SVN: r74830
parent edf7cee8
2003-12-19 Michael Koch <konqueror@gmx.de> 2003-12-19 Michael Koch <konqueror@gmx.de>
* java/text/NumberFormat.java: Sorted imports.
(getCurrency): New method.
(setCurrency): New method.
2003-12-19 Michael Koch <konqueror@gmx.de>
* java/text/MessageFormat.java * java/text/MessageFormat.java
(MessageFormat): New constructor. (MessageFormat): New constructor.
......
...@@ -38,13 +38,14 @@ exception statement from your version. */ ...@@ -38,13 +38,14 @@ exception statement from your version. */
package java.text; package java.text;
import java.util.Locale; import java.io.InvalidObjectException;
import java.util.ResourceBundle; import java.io.IOException;
import java.util.MissingResourceException;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.io.ObjectOutputStream; import java.io.ObjectOutputStream;
import java.io.IOException; import java.util.Currency;
import java.io.InvalidObjectException; import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
/** /**
* This is the abstract superclass of all classes which format and * This is the abstract superclass of all classes which format and
...@@ -760,4 +761,44 @@ public abstract class NumberFormat extends Format implements Cloneable ...@@ -760,4 +761,44 @@ public abstract class NumberFormat extends Format implements Cloneable
serialVersionOnStream = 1; serialVersionOnStream = 1;
stream.defaultWriteObject(); stream.defaultWriteObject();
} }
/**
* Returns the currency used by this number format when formatting currency
* values.
*
* The default implementation throws UnsupportedOperationException.
*
* @return The used currency object, or null.
*
* @throws UnsupportedOperationException If the number format class doesn't
* implement currency formatting.
*
* @since 1.4
*/
public Currency getCurrency()
{
throw new UnsupportedOperationException();
}
/**
* Sets the currency used by this number format when formatting currency
* values.
*
* The default implementation throws UnsupportedOperationException.
*
* @param currency The new currency to be used by this number format.
*
* @throws NullPointerException If currenc is null.
* @throws UnsupportedOperationException If the number format class doesn't
* implement currency formatting.
*
* @since 1.4
*/
public void setCurreny(Currency currency)
{
if (currency == null)
throw new NullPointerException("currency may not be null");
throw new UnsupportedOperationException();
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment