Class Char2ObjectFunctions.Singleton<V>

    • Field Detail

      • key

        protected final char key
      • value

        protected final V value
    • Constructor Detail

      • Singleton

        protected Singleton​(char key,
                            V value)
    • Method Detail

      • size

        public int size()
        Description copied from interface: Function
        Returns the intended number of keys in this function, or -1 if no such number exists.

        Most function implementations will have some knowledge of the intended number of keys in their domain. In some cases, however, this might not be possible.

        Specified by:
        size in interface Function<Character,​V>
        Returns:
        the intended number of keys in this function, or -1 if that number is not available.