Last active
April 12, 2021 06:18
-
-
Save lucapiccinelli/2a6b6118a4695dc11e544c40daf1ff65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline class NotEmptyString | |
| @Deprecated(level = DeprecationLevel.ERROR, message = "use companion method 'of'") | |
| constructor(val value: String){ | |
| @Suppress("DEPRECATION_ERROR") | |
| companion object{ | |
| fun of(value: String): NotEmptyString = validate(NotEmptyString(value)){ | |
| validate(NotEmptyString::value).isNotBlank() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment