Commit 89066f10 by Tom Tromey Committed by Tom Tromey

RuleBasedCollator.java (clone): Rewrote.

	* java/text/RuleBasedCollator.java (clone): Rewrote.
	(RuleBasedCollator(RuleBasedCollator)): Removed.
	* java/text/MessageFormat.java: Re-merged from Classpath.
	* java/text/DecimalFormat.java: Re-merged from Classpath.

From-SVN: r45458
parent cffb2601
2001-09-06 Tom Tromey <tromey@redhat.com>
* java/text/RuleBasedCollator.java (clone): Rewrote.
(RuleBasedCollator(RuleBasedCollator)): Removed.
* java/text/MessageFormat.java: Re-merged from Classpath.
* java/text/DecimalFormat.java: Re-merged from Classpath.
2001-09-06 Anthony Green <green@redhat.com>
* include/jvm.h: Declare _Jv_RegisterResource.
......
......@@ -350,21 +350,9 @@ public class DecimalFormat extends NumberFormat
public Object clone ()
{
return new DecimalFormat (this);
}
private DecimalFormat (DecimalFormat dup)
{
decimalSeparatorAlwaysShown = dup.decimalSeparatorAlwaysShown;
groupingSize = dup.groupingSize;
minExponentDigits = dup.minExponentDigits;
multiplier = dup.multiplier;
negativePrefix = dup.negativePrefix;
negativeSuffix = dup.negativeSuffix;
positivePrefix = dup.positivePrefix;
positiveSuffix = dup.positiveSuffix;
symbols = (DecimalFormatSymbols) dup.symbols.clone();
useExponentialNotation = dup.useExponentialNotation;
DecimalFormat c = (DecimalFormat) super.clone ();
c.symbols = (DecimalFormatSymbols) symbols.clone ();
return c;
}
public DecimalFormat ()
......
// RuleBasedCollator.java - Concrete class for locale-based string compare.
/* Copyright (C) 1999, 2000 Free Software Foundation
/* Copyright (C) 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
......@@ -39,7 +39,10 @@ public class RuleBasedCollator extends Collator
{
public Object clone ()
{
return new RuleBasedCollator (this);
RuleBasedCollator c = (RuleBasedCollator) super.clone ();
c.map = (Hashtable) map.clone ();
c.prefixes = (Hashtable) map.clone ();
return c;
}
// A helper for CollationElementIterator.next().
......@@ -352,17 +355,6 @@ public class RuleBasedCollator extends Collator
}
}
// This is a helper for clone.
private RuleBasedCollator (RuleBasedCollator other)
{
frenchAccents = other.frenchAccents;
rules = other.rules;
decmp = other.decmp;
strength = other.strength;
map = other.map;
prefixes = other.prefixes;
}
// True if we are using French-style accent ordering.
private boolean frenchAccents;
......
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