Class PrimitiveAdapter<T>
java.lang.Object
cc.carm.lib.configuration.adapter.ValueAdapter<T>
cc.carm.lib.configuration.adapter.strandard.PrimitiveAdapter<T>
- All Implemented Interfaces:
ValueParser<T>
,ValueSerializer<T>
-
Field Summary
FieldsFields inherited from class cc.carm.lib.configuration.adapter.ValueAdapter
deserializer, serializer, type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PrimitiveAdapter
(@NotNull Class<T> valueType, @NotNull ValueParser<T> deserializer) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> PrimitiveAdapter
<T> of
(@NotNull Class<T> clazz, @NotNull DataFunction<Object, T> function) static PrimitiveAdapter
<Boolean> static PrimitiveAdapter
<Boolean> static PrimitiveAdapter
<Byte> ofByte()
static PrimitiveAdapter
<Byte> static PrimitiveAdapter
<Character> static PrimitiveAdapter
<Character> static PrimitiveAdapter
<Double> ofDouble()
static PrimitiveAdapter
<Double> static ValueAdapter
<Enum<?>> ofEnum()
static PrimitiveAdapter
<Float> ofFloat()
static PrimitiveAdapter
<Float> static PrimitiveAdapter
<Integer> static PrimitiveAdapter
<Integer> static PrimitiveAdapter
<Long> ofLong()
static PrimitiveAdapter
<Long> static <T extends Number>
PrimitiveAdapter<T> ofNumber
(@NotNull Class<T> numberClass, @NotNull DataFunction<Number, T> castFunction, @NotNull DataFunction<String, T> parseFunction) static PrimitiveAdapter
<Short> ofShort()
static PrimitiveAdapter
<Short> static PrimitiveAdapter
<String> ofString()
Methods inherited from class cc.carm.lib.configuration.adapter.ValueAdapter
equals, hashCode, parse, parser, parser, serialize, serializer, serializer, type
-
Field Details
-
Constructor Details
-
PrimitiveAdapter
protected PrimitiveAdapter(@NotNull @NotNull Class<T> valueType, @NotNull @NotNull ValueParser<T> deserializer)
-
-
Method Details
-
ofEnum
-
ofString
-
ofBoolean
-
ofBooleanType
-
ofCharacter
-
ofCharacterType
-
ofInteger
-
ofIntegerType
-
ofLong
-
ofLongType
-
ofDouble
-
ofDoubleType
-
ofFloat
-
ofFloatType
-
ofShort
-
ofShortType
-
ofByte
-
ofByteType
-
of
public static <T> PrimitiveAdapter<T> of(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull DataFunction<Object, T> function) -
ofNumber
public static <T extends Number> PrimitiveAdapter<T> ofNumber(@NotNull @NotNull Class<T> numberClass, @NotNull @NotNull DataFunction<Number, T> castFunction, @NotNull @NotNull DataFunction<String, T> parseFunction)
-