java.lang.Object
javax.swing.text.html.parser.Entity
- All Implemented Interfaces:
- DTDConstants
An entity is described in a DTD using the ENTITY construct.
 It defines the type and value of the entity.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionchar[]The char array of data.The name of the entity.intThe type of the entity.Fields declared in interface javax.swing.text.html.parser.DTDConstantsANY, 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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionchar[]getData()Returns thedata.getName()Gets the name of the entity.Returns the data as aString.intgetType()Gets the type of the entity.booleanReturnstrueif it is a general entity.booleanReturnstrueif it is a parameter entity.static intConvertsnmstring to the corresponding entity type.
- 
Field Details- 
nameThe name of the entity.
- 
typepublic int typeThe type of the entity.
- 
datapublic char[] dataThe char array of data.
 
- 
- 
Constructor Details- 
EntityCreates an entity.- Parameters:
- name- the name of the entity
- type- the type of the entity
- data- the char array of data
 
 
- 
- 
Method Details- 
getNameGets the name of the entity.- Returns:
- the name of the entity, as a String
 
- 
getTypepublic int getType()Gets the type of the entity.- Returns:
- the type of the entity
 
- 
isParameterpublic boolean isParameter()Returnstrueif it is a parameter entity.- Returns:
- trueif it is a parameter entity
 
- 
isGeneralpublic boolean isGeneral()Returnstrueif it is a general entity.- Returns:
- trueif it is a general entity
 
- 
getDatapublic char[] getData()Returns thedata.- Returns:
- the data
 
- 
getStringReturns the data as aString.- Returns:
- the data as a String
 
- 
name2typeConvertsnmstring 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".- Parameters:
- nm- the string to be converted
- Returns:
- the corresponding entity type, or the type corresponding to "CDATA", if none exists
 
 
-