Class MapUtils


  • public final class MapUtils
    extends Object
    • Method Detail

      • of

        @SafeVarargs
        @NotNull
        public static <K,​V> @NotNull Map<K,​V> of​(Map.Entry<K,​V> @NotNull ... entries)
        Generate map with all entries inside
        Type Parameters:
        K - Key map type
        V - Value map type
        Parameters:
        entries - All entries to insert
        Returns:
        Returns a new map with all entries
      • entry

        @Contract(value="_, _ -> new",
                  pure=true)
        public static <K,​V> @NotNull Map.Entry<K,​V> entry​(K key,
                                                                      V value)
        Generate simple map entry
        Type Parameters:
        K - Generic key type
        V - Generic value type
        Parameters:
        key - Key value
        value - Value of entry
        Returns:
        Returns a new entry instance