⏪️ Restore factory functions of `Zero` and `EmailAddress` to v4.5.1
LVMVRQUXL opened this issue · 0 comments
LVMVRQUXL commented
📝 Description
We want to restore factory functions introduced for the Zero
and the EmailAddress
types in the version 4.5.1, instead of those introduced for the version 4.5.2, for taking more time to think about the right way for creating instances of a type.
class Zero constructor() {
companion object {
fun fromByte(number: Byte): Zero = TODO()
fun fromByteOrNull(number: Byte): Zero? = TODO()
}
}
class EmailAddress {
companion object {
fun fromString(value: Any): EmailAddress = TODO()
fun fromString(value: Any, pattern: Any): EmailAddress = TODO()
fun fromStringOrNull(value: Any): EmailAddress? = TODO()
fun fromStringOrNull(value: Any, pattern: Any): EmailAddress? = TODO()
}
}
✅ Checklist
- ⏪ Restore the
Zero.Companion.fromByte(Byte)
function with tests, documentation and samples. - ⏪ Restore the
Zero.Companion.fromByteOrNull(Byte)
function with tests, documentation and samples. - 🔥 Remove all other factory functions added for the
Zero
type. - ⏪ Restore the
EmailAddress.Companion.fromString(Any)
function with tests, documentation and samples. - ⏪ Restore the
EmailAddress.Companion.fromStringOrNull(Any)
function with tests, documentation and samples. - ⏪ Restore the
EmailAddress.Companion.fromString(Any, Any)
function with tests, documentation and samples. - ⏪ Restore the
EmailAddress.Companion.fromStringOrNull(Any, Any)
function with tests, documentation and samples. - 🔥 Remove all other factory functions added for the
EmailAddress
type. - 📝 Update the unreleased changelog for this issue.