站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Java(TM) 2 Platform, Standard Edition, v1.2.2 API Specification: Class HTML.UnknownTag - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

JavaTM 2 Platform
Standard Edition

javax.swing.text.html
Class HTML.UnknownTag

java.lang.Object
  |
  +--javax.swing.text.html.HTML.Tag
        |
        +--javax.swing.text.html.HTML.UnknownTag
Enclosing class:
HTML

public static class HTML.UnknownTag
extends HTML.Tag
implements Serializable

See Also:
Serialized Form

Fields inherited from class javax.swing.text.html.HTML.Tag
A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BIG, BLOCKQUOTE, BODY, BR, CAPTION, CENTER, CITE, CODE, COMMENT, CONTENT, DD, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IMG, IMPLIED, INPUT, ISINDEX, KBD, LI, LINK, MAP, MENU, META, NOFRAMES, OBJECT, OL, OPTION, P, PARAM, PRE, S, SAMP, SCRIPT, SELECT, SMALL, STRIKE, STRONG, STYLE, SUB, SUP, TABLE, TD, TEXTAREA, TH, TITLE, TR, TT, U, UL, VAR
 
Constructor Summary
HTML.UnknownTag(String id)
           
 
Method Summary
 boolean equals(Object obj)
          Compares this object to the specifed object.
 int hashCode()
          Returns a hash code value for the object.
 
Methods inherited from class javax.swing.text.html.HTML.Tag
breaksFlow, isBlock, isPreformatted, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTML.UnknownTag

public HTML.UnknownTag(String id)
Method Detail

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Tags copied from class: Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object obj)
Compares this object to the specifed object. The result is true if and only if the argument is not null and is a UnknownTag object with the same name.
Overrides:
equals in class Object
Parameters:
obj - the object to compare this tag with.
Returns:
true if the objects are equal; false otherwise.

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.