Package gnu.text

Class NamedCharTable

  • All Implemented Interfaces:
    java.util.Map<java.lang.String,​java.lang.String>

    public class NamedCharTable
    extends GeneralHashTable<java.lang.String,​java.lang.String>
    A table to manage standard character names. This is conceptually a HashMap<String,String>, except that the value strings are allocated lazily when the key is first requested. (Not sure if this is worth a separate class, but the code is simple, it should make startup faster, and save having to intern over 2200 value strings.)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedCharTable()  
    • Constructor Detail

      • NamedCharTable

        public NamedCharTable()
    • Method Detail

      • makeEntry

        protected HashNode<java.lang.String,​java.lang.String> makeEntry​(java.lang.String key,
                                                                              int hash,
                                                                              java.lang.String value)
        Description copied from class: GeneralHashTable
        Allocate a new node in the hash table.
        Overrides:
        makeEntry in class GeneralHashTable<java.lang.String,​java.lang.String>
      • appendTo

        public boolean appendTo​(java.lang.String key,
                                java.lang.Appendable out)
      • put

        public void put​(java.lang.String name,
                        int char1)
      • put

        public void put​(java.lang.String name,
                        int char1,
                        int char2)