Package cpw.mods.modlauncher.api
Class TypesafeMap
java.lang.Object
cpw.mods.modlauncher.api.TypesafeMap
Typed key-value map, similar to the AttributeKey netty stuff. Uses lambda interfaces for get/set.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUnique blackboard keystatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentHashMap<String, TypesafeMap.Key<Object>> private final ConcurrentHashMap<TypesafeMap.Key<Object>, Object> private static final ConcurrentHashMap<Class<?>, TypesafeMap> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> VcomputeIfAbsent(TypesafeMap.Key<V> key, Function<? super TypesafeMap.Key<V>, ? extends V> valueFunction) private <C1,C2, V>
VcomputeIfAbsent(ConcurrentHashMap<C1, C2> map, TypesafeMap.Key<V> key, Function<? super TypesafeMap.Key<V>, ? extends V> valueFunction) <V> Optional<V> get(TypesafeMap.Key<V> key) private ConcurrentHashMap<String, TypesafeMap.Key<Object>>
-
Field Details
-
maps
-
map
-
keys
-
-
Constructor Details
-
TypesafeMap
public TypesafeMap() -
TypesafeMap
-
-
Method Details
-
get
-
computeIfAbsent
public <V> V computeIfAbsent(TypesafeMap.Key<V> key, Function<? super TypesafeMap.Key<V>, ? extends V> valueFunction) -
computeIfAbsent
private <C1,C2, V computeIfAbsentV> (ConcurrentHashMap<C1, C2> map, TypesafeMap.Key<V> key, Function<? super TypesafeMap.Key<V>, ? extends V> valueFunction) -
getKeyIdentifiers
-