ColorAsLongSerializer


@RequiresApi(api = Build.VERSION_CODES.O)
class ColorAsLongSerializer : LongSerializer


Serializer for Color as a long.

Summary

Public constructors

Public functions

Color
deserialize(value: Long)

Deserializes a long to a Color.

Long
serialize(color: Color)

Serializes a Color to a long.

Public constructors

ColorAsLongSerializer

Added in 1.2.0-alpha01
ColorAsLongSerializer()

Public functions

deserialize

Added in 1.2.0-alpha01
fun deserialize(value: Long): Color

Deserializes a long to a Color.

Parameters
value: Long

The long to deserialize.

Returns
Color

The Color deserialized from the long.

serialize

Added in 1.2.0-alpha01
fun serialize(color: Color): Long

Serializes a Color to a long.

Parameters
color: Color

The Color to serialize.

Returns
Long

The long serialized from the Color.