Class Scalars
- java.lang.Object
-
- org.spongepowered.configurate.serialize.Scalars
-
public final class Scalars extends java.lang.Object
Scalar value serializers availableEach of these serializers can be used through a configuration node, or directly with a value.
- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static ScalarSerializer<java.lang.Boolean>
BOOLEAN
Serializer forboolean
values.static ScalarSerializer<java.lang.Byte>
BYTE
Serializer forByte
values.static ScalarSerializer<java.lang.Character>
CHAR
Serializer forchar
values.static ScalarSerializer<java.lang.Double>
DOUBLE
Serializer forDouble
values.static ScalarSerializer<java.lang.Enum<?>>
ENUM
Serializer for values inenum
classes.static ScalarSerializer<java.lang.Float>
FLOAT
Serializer forFloat
values.static ScalarSerializer<java.lang.Integer>
INTEGER
Serializer forInteger
values.static ScalarSerializer<java.lang.Long>
LONG
Serializer forLong
values.static ScalarSerializer<java.util.regex.Pattern>
PATTERN
Serializer forPattern
values.static ScalarSerializer<java.lang.Short>
SHORT
Serializer forShort
values.static ScalarSerializer<java.lang.String>
STRING
Serializer forString
values.static ScalarSerializer<java.net.URI>
URI
Serializer forURI
values.static ScalarSerializer<java.net.URL>
URL
Serializer forURL
values.static ScalarSerializer<java.util.UUID>
UUID
Serializer forUUID
values.
-
-
-
Field Detail
-
BOOLEAN
public static final ScalarSerializer<java.lang.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<java.lang.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<java.lang.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<java.lang.Enum<?>> ENUM
Serializer for values inenum
classes.Value lookup is case-insensitive and ignores underscores.
- Since:
- 4.0.0
-
PATTERN
public static final ScalarSerializer<java.util.regex.Pattern> PATTERN
Serializer forPattern
values.Patterns will be compiled with default options.
- Since:
- 4.0.0
-
URI
public static final ScalarSerializer<java.net.URI> URI
Serializer forURI
values.- Since:
- 4.0.0
-
URL
public static final ScalarSerializer<java.net.URL> URL
Serializer forURL
values.- Since:
- 4.0.0
-
UUID
public static final ScalarSerializer<java.util.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<java.lang.Byte> BYTE
Serializer forByte
values.- Since:
- 4.0.0
-
SHORT
public static final ScalarSerializer<java.lang.Short> SHORT
Serializer forShort
values.- Since:
- 4.0.0
-
INTEGER
public static final ScalarSerializer<java.lang.Integer> INTEGER
Serializer forInteger
values.- Since:
- 4.0.0
-
LONG
public static final ScalarSerializer<java.lang.Long> LONG
Serializer forLong
values.- Since:
- 4.0.0
-
FLOAT
public static final ScalarSerializer<java.lang.Float> FLOAT
Serializer forFloat
values.- Since:
- 4.0.0
-
DOUBLE
public static final ScalarSerializer<java.lang.Double> DOUBLE
Serializer forDouble
values.- Since:
- 4.0.0
-
-