diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-03 18:26:51 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-03 18:26:51 +0000 |
commit | fe03e3ea5afb6758b6ef2f16d34dbfec30426fdf (patch) | |
tree | 85aea7711b50644d2a0b864b59738c7489ebc02b /libjava/java/text/NumberFormat.java | |
parent | 39fc636106eb94c1e4a62ed7b080f2f88cbadda8 (diff) | |
download | ppe42-gcc-fe03e3ea5afb6758b6ef2f16d34dbfec30426fdf.tar.gz ppe42-gcc-fe03e3ea5afb6758b6ef2f16d34dbfec30426fdf.zip |
* java/util/Calendar.java (toString): New method.
* java/util/SimpleTimeZone.java (clone): New method.
(toString): New method.
* java/util/TimeZone.java (clone): New method.
* java/text/SimpleDateFormat.java (clone): New method.
* java/text/NumberFormat.java (clone): New method.
(equals): New method.
* java/text/Format.java (clone): New method.
* java/text/DateFormatSymbols.java (DateFormatSymbols): New
constructor.
(clone): New method.
* java/text/DateFormat.java (clone): New method.
* java/text/Collator.java (clone): New method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31775 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/text/NumberFormat.java')
-rw-r--r-- | libjava/java/text/NumberFormat.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libjava/java/text/NumberFormat.java b/libjava/java/text/NumberFormat.java index 56615915efa..bc96cbc9452 100644 --- a/libjava/java/text/NumberFormat.java +++ b/libjava/java/text/NumberFormat.java @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Red Hat, Inc. +/* Copyright (C) 1998, 1999, 2000 Red Hat, Inc. This file is part of libgcj. @@ -50,6 +50,27 @@ public abstract class NumberFormat extends Format implements Cloneable public abstract StringBuffer format (long number, StringBuffer sbuf, FieldPosition pos); + public Object clone () + { + // We know the superclass just uses Object's generic cloner. + // Why not just inherit? Because the online docs specify that + // this method exists for this class. + return super.clone (); + } + + public boolean equals (Object obj) + { + if (! (obj instanceof NumberFormat)) + return false; + NumberFormat nf = (NumberFormat) obj; + return (groupingUsed == nf.groupingUsed + && maximumFractionDigits == nf.maximumFractionDigits + && maximumIntegerDigits == nf.maximumIntegerDigits + && minimumFractionDigits == nf.minimumFractionDigits + && minimumIntegerDigits == nf.minimumIntegerDigits + && parseIntegerOnly == nf.parseIntegerOnly); + } + public static Locale[] getAvailableLocales () { // FIXME. |