Package org.godot.utilities.utils
Class MapUtils
- java.lang.Object
-
- org.godot.utilities.utils.MapUtils
-
public final class MapUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
@NotNull Map.Entry<K,V>entry(K key, V value)Generate simple map entrystatic <K,V>
voidforeach(@NotNull Map<K,V> map, IAnyUtilsCallbacks.IForeach<Map.Entry<K,V>> callback)Foreach methodstatic <K,V>
@NotNull Map<K,V>of(Map.Entry<K,V> @NotNull ... entries)Generate map with all entries inside
-
-
-
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 typeV- 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 typeV- Generic value type- Parameters:
key- Key valuevalue- Value of entry- Returns:
- Returns a new entry instance
-
foreach
public static <K,V> void foreach(@NotNull @NotNull Map<K,V> map, IAnyUtilsCallbacks.IForeach<Map.Entry<K,V>> callback)
Foreach method- Type Parameters:
K- Generic key typeV- Generic value type- Parameters:
map- Target mapcallback- Target execution callback
-
-