This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.text.html.parser
class Entity

java.lang.Object extended by javax.swing.text.html.parser.Entity
All Implemented Interfaces:
DTDConstants

public final class Entity
extends Object
implements DTDConstants

An entity is described in a DTD using the ENTITY construct. It defines the type and value of the the entity.


Field Summary
 char[] data
          
 String name
          
 int type
          
 
Constructor Summary
Entity(String name, int type, char[] data)

          Creates an entity.
 
Method Summary
 char[]

          Returns the data.
 String

          Gets the name of the entity.
 String

          Returns the data as a String.
 int

          Gets the type of the entity.
 boolean

          Returns true if it is a general entity.
 boolean

          Returns true if it is a parameter entity.
static int

          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

data

public char[] data

name

public String name

type

public int type
Constructor Detail

Entity

public Entity(String name,
              int type,
              char[] data)
Creates an entity.

Parameters:
name - the name of the entity
type - the type of the entity
data - the char array of data
Method Detail

getData

public char[] getData()
Returns the data.

Returns:
the data

getName

public String getName()
Gets the name of the entity.

Returns:
the name of the entity, as a String

getString

public String getString()
Returns the data as a String.

Returns:
the data as a String

getType

public int getType()
Gets the type of the entity.

Returns:
the type of the entity

isGeneral

public boolean isGeneral()
Returns true if it is a general entity.

Returns:
true if it is a general entity

isParameter

public boolean isParameter()
Returns true if it is a parameter entity.

Returns:
true if it is a parameter entity

name2type

public static int name2type(String nm)
Converts 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".

Parameters:
nm - the string to be converted
Returns:
the corresponding entity type, or the type corresponding to "CDATA", if none exists


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.