Class HTMLCharacterEntities


  • public class HTMLCharacterEntities
    extends java.lang.Object
    Table for HTML character entities.

    Built on Wed May 09 16:29:49 CEST 2012 by Christopher Mindus from:
    - http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
    - http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent
    - http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent

    Author:
    com.iizix.text.util.BuildHTMLCharacterEntities
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static chargetChar​(java.lang.String string)
      Maps a String character entity to a char.
      static java.lang.StringgetString​(char ch)
      Maps a char value to a String character entity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HTMLCharacterEntities

        public HTMLCharacterEntities()
    • Method Detail

      • getChar

        public static final char getChar​(java.lang.String string)
        Maps a String character entity to a char. The string should only contain the actual text, not the surrounding "&...;" decoration.
        Parameters:
        string - The string without decorations, case sensitive.
        Returns:
        The character corresponding with the entity string, null ('') character otherwise.
      • getString

        public static final java.lang.String getString​(char ch)
        Maps a char value to a String character entity.
        Parameters:
        ch - The character to map.
        Returns:
        The String character entity for the character, null if not found.