| 
JavaTM 2 Platform Std. Ed. v1.4.2  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.text.html.parser.Entity
An entity is described in a DTD using the ENTITY construct. It defines the type and value of the the entity.
DTD| Field Summary | |
 char[] | 
data
 | 
 String | 
name
 | 
 int | 
type
 | 
| Fields inherited from interface javax.swing.text.html.parser.DTDConstants | 
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM | 
| Constructor Summary | |
Entity(String name,
       int type,
       char[] data)
Creates an entity.  | 
|
| Method Summary | |
 char[] | 
getData()
Returns the data. | 
 String | 
getName()
Gets the name of the entity.  | 
 String | 
getString()
Returns the data as a String. | 
 int | 
getType()
Gets the type of the entity.  | 
 boolean | 
isGeneral()
Returns true if it is a general entity. | 
 boolean | 
isParameter()
Returns true if it is a parameter entity. | 
static int | 
name2type(String nm)
Converts nm string to the corresponding
 entity type. | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public String name
public int type
public char[] data
| Constructor Detail | 
public Entity(String name,
              int type,
              char[] data)
name - the name of the entitytype - the type of the entitydata - the char array of data| Method Detail | 
public String getName()
Stringpublic int getType()
public boolean isParameter()
true if it is a parameter entity.
true if it is a parameter entitypublic boolean isGeneral()
true if it is a general entity.
true if it is a general entitypublic char[] getData()
data.
datapublic String getString()
String.
Stringpublic static int name2type(String nm)
nm string to the corresponding
 entity type.  If the string does not have a corresponding
 entity type, returns the type corresponding to "CDATA".
 Valid entity types are: "PUBLIC", "CDATA", "SDATA", "PI",
 "STARTTAG", "ENDTAG", "MS", "MD", "SYSTEM".
nm - the string to be converted
  | 
JavaTM 2 Platform Std. Ed. v1.4.2  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.