diff options
| author | Mark Wielaard <mark@gcc.gnu.org> | 2006-03-10 21:46:48 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@gcc.gnu.org> | 2006-03-10 21:46:48 +0000 |
| commit | 8aa540d2f783474d1d2e06f16744bf67b9c1facc (patch) | |
| tree | ea38c56431c5d4528fb54254c3f8e50f517bede3 /libjava/classpath/javax/swing/text/html/HTML.java | |
| parent | 27079765d00123f8e53d0e1ef7f9d46559266e6d (diff) | |
Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r111942
Diffstat (limited to 'libjava/classpath/javax/swing/text/html/HTML.java')
| -rw-r--r-- | libjava/classpath/javax/swing/text/html/HTML.java | 79 |
1 files changed, 6 insertions, 73 deletions
diff --git a/libjava/classpath/javax/swing/text/html/HTML.java b/libjava/classpath/javax/swing/text/html/HTML.java index 0b758d2b873..2b521cd22b4 100644 --- a/libjava/classpath/javax/swing/text/html/HTML.java +++ b/libjava/classpath/javax/swing/text/html/HTML.java @@ -57,8 +57,7 @@ public class HTML /** * Represents a HTML attribute. */ - public static class Attribute - implements Serializable + public static final class Attribute { /** * The action attribute @@ -464,47 +463,18 @@ public class HTML * The width attribute */ public static final Attribute WIDTH = new Attribute("width"); - private final String name; - - /** - * Creates the attribute with the given name. - */ - protected Attribute(String a_name) - { - name = a_name; - } - - /** - * Calls compareTo on the tag names (Strings) - */ - public int compareTo(Object other) - { - return name.compareTo(((Attribute) other).name); - } /** - * The attributes are equal if the names are equal - * (ignoring case) + * The attribute name. */ - public boolean equals(Object other) - { - if (other == this) - return true; - - if (!(other instanceof Attribute)) - return false; - - Attribute that = (Attribute) other; - - return that.name.equalsIgnoreCase(name); - } + private final String name; /** - * Returns the hash code which corresponds to the string for this tag. + * Creates the attribute with the given name. */ - public int hashCode() + private Attribute(String a_name) { - return name == null ? 0 : name.hashCode(); + name = a_name; } /** @@ -559,7 +529,6 @@ public class HTML * Represents a HTML tag. */ public static class Tag - implements Comparable, Serializable { /** * The <a> tag @@ -1047,42 +1016,6 @@ public class HTML } /** - * Calls compareTo on the tag names (Strings) - */ - public int compareTo(Object other) - { - return name.compareTo(((Tag) other).name); - } - - /** - * The tags are equal if the names are equal (ignoring case). - */ - public boolean equals(Object other) - { - if (other == this) - { - return true; - } - - if (!(other instanceof Tag)) - { - return false; - } - - Tag that = (Tag) other; - - return that.name.equalsIgnoreCase(name); - } - - /** - * Returns the hash code which corresponds to the string for this tag. - */ - public int hashCode() - { - return name == null ? 0 : name.hashCode(); - } - - /** * Returns the tag name. The names of the built-in tags are always * returned in lowercase. */ |
