Constructors
init.number
init.number
creates a new integer with a pre-defined value. By default, numeric values are bridged, so you can use ints and doubles interchangeably. However, some transformers require a pure integer value, and using double will result in an error.
init.string
init.string
creates a new string with pre-defined value:
Note that the compiler is smart enough to know what you are asking for and in most cases, you can just omit the method altogether. The following syntax produces the same result:
init.array
init.array
creates a new, empty array that can be mutated using transformers:
init.dictionary
init.dictionary
creates a new, empty object that can be mutated using transformers:
Last updated
Was this helpful?