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
This commit is contained in:
Tom Tromey 2001-09-07 00:15:47 +00:00 committed by Tom Tromey
parent cffb260138
commit 89066f10f5
4 changed files with 461 additions and 408 deletions

View file

@ -1,6 +1,6 @@
// 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;