Class Entities

    • Method Detail

      • isNamedEntity

        public static boolean isNamedEntity​(String name)
        Check if the input is a known named entity
        Parameters:
        name - the possible entity name (e.g. "lt" or "amp")
        Returns:
        true if a known named entity
      • isBaseNamedEntity

        public static boolean isBaseNamedEntity​(String name)
        Check if the input is a known named entity in the base entity set.
        Parameters:
        name - the possible entity name (e.g. "lt" or "amp")
        Returns:
        true if a known named entity in the base set
        See Also:
        isNamedEntity(String)
      • getCharacterByName

        public static Character getCharacterByName​(String name)
        Deprecated.
        does not support characters outside the BMP or multiple character names
        Get the Character value of the named entity
        Parameters:
        name - named entity (e.g. "lt" or "amp")
        Returns:
        the Character value of the named entity (e.g. '<' or '&')
      • getByName

        public static String getByName​(String name)
        Get the character(s) represented by the named entity
        Parameters:
        name - entity (e.g. "lt" or "amp")
        Returns:
        the string value of the character(s) represented by this entity, or "" if not defined
      • codepointsForName

        public static int codepointsForName​(String name,
                                            int[] codepoints)