K - key typeV - value typepublic abstract class TypedReg<K,V> extends Object
Usage: construct final anonymous subclasses in interfaces.
public interface Solos {
TypedReg<Integer, String> PasssaltByUid = new TypedReg<Integer, String>() {};
TypedReg<Integer, Set<String>> PermitsByUid = new TypedReg<Integer, Set<String>>() {};
}
| Modifier and Type | Class and Description |
|---|---|
static class |
TypedReg.Key<K,V> |
| Modifier and Type | Field and Description |
|---|---|
@NotNull Type |
keyType |
@NotNull Class<? extends TypedReg<K,V>> |
regType |
@NotNull Type |
valType |
| Modifier | Constructor and Description |
|---|---|
protected |
TypedReg() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> @NotNull TypedReg<K,V> |
deserialize(@NotNull String clz)
deserialize to singleton instance
|
static <K,V> TypedReg<K,V> |
deserialize(@NotNull String clz,
boolean nonnull)
deserialize to singleton instance
|
boolean |
equals(Object o) |
int |
hashCode() |
static <K,V> TypedReg.Key<K,V> |
key(@NotNull TypedReg<K,V> reg,
K key) |
@NotNull String |
serialize()
serialize to string
|
String |
toString() |
@NotNull public final @NotNull Type keyType
@NotNull public final @NotNull Type valType
@NotNull public @NotNull String serialize()
@NotNull public static <K,V> @NotNull TypedReg<K,V> deserialize(@NotNull @NotNull String clz)
@Contract(value="_,true->!null") public static <K,V> TypedReg<K,V> deserialize(@NotNull @NotNull String clz, boolean nonnull)
public static <K,V> TypedReg.Key<K,V> key(@NotNull @NotNull TypedReg<K,V> reg, K key)
Copyright © 2023. All rights reserved.