Class StringIntMap

java.lang.Object
io.micronaut.core.util.StringIntMap

@Internal public final class StringIntMap extends Object
Fixed-size String->int map optimized for very fast read operations.
Since:
4.0.0
Author:
Jonas Konrad
  • Constructor Details

    • StringIntMap

      public StringIntMap(int size)
      Create a new map. The given size must not be exceeded by put(java.lang.String, int) operations, or there may be infinite loops. There is no sanity check for this for performance reasons!
      Parameters:
      size - The maximum size of the map
  • Method Details

    • get

      public int get(String key, int def)
    • put

      public void put(String key, int value)