javax.swing.text.html.parser

Class 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.
    See Also:
    DTD
    • Field Detail

      • type

        public int type
      • data

        public char[] data
    • 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

      • getName

        public String getName()
        Gets the name of the entity.
        Returns:
        the name of the entity, as a String
      • getType

        public int getType()
        Gets the type of the entity.
        Returns:
        the type of the entity
      • isParameter

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

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

        public char[] getData()
        Returns the data.
        Returns:
        the data
      • getString

        public String getString()
        Returns the data as a String.
        Returns:
        the data as a String
      • 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

Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/swing/text/html/parser/Entity.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut