Package hiiragi283.core.api.property
Class HTPropertyKey
-
- All Implemented Interfaces:
-
kotlin.Comparable
public final class HTPropertyKey<T extends Object> implements Comparable<HTPropertyKey<?>>
HTPropertyMapのキーとして使用されるクラスです。
- Since:
0.6.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description private final ResourceLocationidprivate final TdefaultValue
-
Method Summary
Modifier and Type Method Description final ResourceLocationgetId()final TgetDefaultValue()IntegercompareTo(HTPropertyKey<?> other)StringtoString()final static <T extends Any> HTPropertyKey<T>createNullable(ResourceLocation id)指定したidから,デフォルト値が nullとなる新しいHTPropertyKeyのインスタンスを作成します。final static HTPropertyKey<Unit>createFlag(ResourceLocation id)指定したidから,デフォルト値が nullとなる新しいHTPropertyKeyのインスタンスを作成します。final static <T extends Any> HTPropertyKey<Set<T>>createSet(ResourceLocation id)指定したidから,Set向けの新しいHTPropertyKeyのインスタンスを作成します。 final static <K extends Any, V extends Any> HTPropertyKey<Map<K, V>>createMap(ResourceLocation id)指定したidから,Map向けの新しいHTPropertyKeyのインスタンスを作成します。 final static <T extends Any> HTPropertyKey<T>create(ResourceLocation id, T defaultValue)指定したidとdefaultValueから新しいHTPropertyKeyのインスタンスを作成します。 -
-
Method Detail
-
getId
final ResourceLocation getId()
-
getDefaultValue
final T getDefaultValue()
-
compareTo
Integer compareTo(HTPropertyKey<?> other)
-
createNullable
final static <T extends Any> HTPropertyKey<T> createNullable(ResourceLocation id)
指定したidから,デフォルト値が
nullとなる新しいHTPropertyKeyのインスタンスを作成します。
-
createFlag
final static HTPropertyKey<Unit> createFlag(ResourceLocation id)
指定したidから,デフォルト値が
nullとなる新しいHTPropertyKeyのインスタンスを作成します。
-
createSet
final static <T extends Any> HTPropertyKey<Set<T>> createSet(ResourceLocation id)
指定したidから,Set向けの新しいHTPropertyKeyのインスタンスを作成します。
- Since:
0.8.0
-
createMap
final static <K extends Any, V extends Any> HTPropertyKey<Map<K, V>> createMap(ResourceLocation id)
指定したidから,Map向けの新しいHTPropertyKeyのインスタンスを作成します。
-
create
final static <T extends Any> HTPropertyKey<T> create(ResourceLocation id, T defaultValue)
指定したidとdefaultValueから新しいHTPropertyKeyのインスタンスを作成します。
-
-
-
-