aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/text/NumberFormat.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-12-19 10:00:02 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-12-19 10:00:02 +0000
commitb2fbbf564f3464ab69826e5e62cf8c6d9873fe35 (patch)
tree1f83bf4410eddd53b6a86a3c5cd5c62229f06fcc /libjava/java/text/NumberFormat.java
parentedf7cee87ba8f572dd2b41df41441542ad135f0c (diff)
downloadgcc-b2fbbf564f3464ab69826e5e62cf8c6d9873fe35.zip
gcc-b2fbbf564f3464ab69826e5e62cf8c6d9873fe35.tar.gz
gcc-b2fbbf564f3464ab69826e5e62cf8c6d9873fe35.tar.bz2
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
Diffstat (limited to 'libjava/java/text/NumberFormat.java')
-rw-r--r--libjava/java/text/NumberFormat.java51
1 files changed, 46 insertions, 5 deletions
diff --git a/libjava/java/text/NumberFormat.java b/libjava/java/text/NumberFormat.java
index aa5ed9f..568018f 100644
--- a/libjava/java/text/NumberFormat.java
+++ b/libjava/java/text/NumberFormat.java
@@ -38,13 +38,14 @@ exception statement from your version. */
package java.text;
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.MissingResourceException;
+import java.io.InvalidObjectException;
+import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.IOException;
-import java.io.InvalidObjectException;
+import java.util.Currency;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
/**
* This is the abstract superclass of all classes which format and
@@ -760,4 +761,44 @@ public abstract class NumberFormat extends Format implements Cloneable
serialVersionOnStream = 1;
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();
+ }
}