library / org.akop.kotx.tools / Bundler / Default

Default

@Target([AnnotationTarget.FIELD]) annotation class Default

Annotation specifying the default value for primitive types. Must be specified in conjuction with Storable, otherwise it has no effect.

Only one argument will be used to set default, and it should be the one appropriate for the type (e.g. float for Float). No conversion or casting will be performed, so setting float for Double types will not have any effect.

Constructors

<init>

Default(float: Float = 0f, double: Double = 0.0, boolean: Boolean = false, byte: Byte = 0, short: Short = 0, int: Int = 0, long: Long = 0, char: Char = 0.toChar(), string: String = "")

Annotation specifying the default value for primitive types. Must be specified in conjuction with Storable, otherwise it has no effect.

Properties

boolean

val boolean: Boolean

byte

val byte: Byte

char

val char: Char

double

val double: Double

float

val float: Float

int

val int: Int

long

val long: Long

short

val short: Short

string

val string: String