Package dev.voidframework.core.lang
Class TypedMap
java.lang.Object
dev.voidframework.core.lang.TypedMap
Typed key-value map.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean<T> Tget(TypedMap.Key<T> typedKey) Retrieves the value associated to the specified key.inthashCode()<T> Tput(TypedMap.Key<T> typedKey, T value) Associates the specified value with the specified key.<T> Tremove(TypedMap.Key<T> typedKey) Removes the value associated to the specified key.toString()
-
Constructor Details
-
TypedMap
public TypedMap()Build a new instance.
-
-
Method Details
-
get
Retrieves the value associated to the specified key.- Type Parameters:
T- The value type- Parameters:
typedKey- The typed key- Returns:
- The value associated to the specified key, otherwise,
null
-
put
Associates the specified value with the specified key.- Type Parameters:
T- The value type- Parameters:
typedKey- The typed keyvalue- The value to associate with the given key- Returns:
- The previous value associated with key, otherwise,
null
-
remove
Removes the value associated to the specified key.- Type Parameters:
T- The value type- Parameters:
typedKey- The typed key- Returns:
- The value associated to the specified key, otherwise,
null
-
equals
-
hashCode
public int hashCode() -
toString
-