Class Scalars


  • public final class Scalars
    extends java.lang.Object
    Scalar value serializers available

    Each of these serializers can be used through a configuration node, or directly with a value.

    Since:
    4.0.0
    • Field Detail

      • BOOLEAN

        public static final ScalarSerializer<java.lang.Boolean> BOOLEAN
        Serializer for boolean values.

        Case-insensitive true values are: true, t, yes, y, and 1.

        Case-insensitive false values are: false, f, no, n, and 0

        Since:
        4.0.0
      • STRING

        public static final ScalarSerializer<java.lang.String> STRING
        Serializer for String 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 for char 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 in enum classes.

        Value lookup is case-insensitive and ignores underscores.

        Since:
        4.0.0
      • PATTERN

        public static final ScalarSerializer<java.util.regex.Pattern> PATTERN
        Serializer for Pattern values.

        Patterns will be compiled with default options.

        Since:
        4.0.0
      • URI

        public static final ScalarSerializer<java.net.URI> URI
        Serializer for URI values.
        Since:
        4.0.0
      • URL

        public static final ScalarSerializer<java.net.URL> URL
        Serializer for URL values.
        Since:
        4.0.0
      • UUID

        public static final ScalarSerializer<java.util.UUID> UUID
        Serializer for UUID 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 for Byte values.
        Since:
        4.0.0
      • SHORT

        public static final ScalarSerializer<java.lang.Short> SHORT
        Serializer for Short values.
        Since:
        4.0.0
      • INTEGER

        public static final ScalarSerializer<java.lang.Integer> INTEGER
        Serializer for Integer values.
        Since:
        4.0.0
      • LONG

        public static final ScalarSerializer<java.lang.Long> LONG
        Serializer for Long values.
        Since:
        4.0.0
      • FLOAT

        public static final ScalarSerializer<java.lang.Float> FLOAT
        Serializer for Float values.
        Since:
        4.0.0
      • DOUBLE

        public static final ScalarSerializer<java.lang.Double> DOUBLE
        Serializer for Double values.
        Since:
        4.0.0