Class Scalars
- java.lang.Object
-
- org.spongepowered.configurate.serialize.Scalars
-
-
Field Summary
Fields Modifier and Type Field Description static ScalarSerializer<Boolean>
BOOLEAN
Serializer forboolean
values.static ScalarSerializer<Byte>
BYTE
Serializer forByte
values.static ScalarSerializer<Character>
CHAR
Serializer forchar
values.static ScalarSerializer<Double>
DOUBLE
Serializer forDouble
values.static ScalarSerializer<Enum<?>>
ENUM
Serializer for values inenum
classes.static ScalarSerializer<Float>
FLOAT
Serializer forFloat
values.static ScalarSerializer<Integer>
INTEGER
Serializer forInteger
values.static ScalarSerializer<Long>
LONG
Serializer forLong
values.static ScalarSerializer<Pattern>
PATTERN
Serializer forPattern
values.static ScalarSerializer<Short>
SHORT
Serializer forShort
values.static ScalarSerializer<String>
STRING
Serializer forString
values.static ScalarSerializer<URI>
URI
Serializer forURI
values.static ScalarSerializer<URL>
URL
Serializer forURL
values.static ScalarSerializer<UUID>
UUID
Serializer forUUID
values.
-
-
-
Field Detail
-
BOOLEAN
public static final ScalarSerializer<Boolean> BOOLEAN
Serializer forboolean
values.Case-insensitive true values are:
true
,t
,yes
,y
, and1
.Case-insensitive false values are:
false
,f
,no
,n
, and0
- Since:
- 4.0.0
-
STRING
public static final ScalarSerializer<String> STRING
Serializer forString
values.Values that are not already strings are converted using
Object.toString()
.- Since:
- 4.0.0
-
CHAR
public static final ScalarSerializer<Character> CHAR
Serializer forchar
values.A character can be converted from a 1-long
String
, or a number.- Since:
- 4.0.0
-
ENUM
public static final ScalarSerializer<Enum<?>> ENUM
Serializer for values inenum
classes.Value lookup is case-insensitive and ignores underscores.
- Since:
- 4.0.0
-
PATTERN
public static final ScalarSerializer<Pattern> PATTERN
Serializer forPattern
values.Patterns will be compiled with default options.
- Since:
- 4.0.0
-
URI
public static final ScalarSerializer<URI> URI
Serializer forURI
values.- Since:
- 4.0.0
-
URL
public static final ScalarSerializer<URL> URL
Serializer forURL
values.- Since:
- 4.0.0
-
UUID
public static final ScalarSerializer<UUID> UUID
Serializer forUUID
values.UUIDs will be accept in RFC format, and RFC format without dashes (Mojang style).
- Since:
- 4.0.0
-
BYTE
public static final ScalarSerializer<Byte> BYTE
Serializer forByte
values.- Since:
- 4.0.0
-
SHORT
public static final ScalarSerializer<Short> SHORT
Serializer forShort
values.- Since:
- 4.0.0
-
INTEGER
public static final ScalarSerializer<Integer> INTEGER
Serializer forInteger
values.- Since:
- 4.0.0
-
LONG
public static final ScalarSerializer<Long> LONG
Serializer forLong
values.- Since:
- 4.0.0
-
FLOAT
public static final ScalarSerializer<Float> FLOAT
Serializer forFloat
values.- Since:
- 4.0.0
-
DOUBLE
public static final ScalarSerializer<Double> DOUBLE
Serializer forDouble
values.- Since:
- 4.0.0
-
-