类 IntMap


  • public class IntMap
    extends Object
    The IntMap provides a simple hashmap from keys to integers. The API is an abbreviation of the HashMap collection API.

    The convenience of IntMap is avoiding all the silly wrapping of integers.

    • 字段详细资料

      • NULL

        public static final int NULL
        Encoding of a null entry. Since NULL is equal to Integer.MIN_VALUE, it's impossible to distinguish between the two.
        另请参阅:
        常量字段值
    • 构造器详细资料

      • IntMap

        public IntMap()
        Create a new IntMap. Default size is 16.
    • 方法详细资料

      • clear

        public void clear()
        Clear the hashmap.
      • size

        public int size()
        Returns the current number of entries in the map.
      • get

        public int get​(Object key)
        Puts a new value in the property table with the appropriate flags
      • put

        public int put​(Object key,
                       int value)
        Puts a new value in the property table with the appropriate flags
      • remove

        public int remove​(Object key)
        Deletes the entry. Returns true if successful.