Last active
June 10, 2020 12:20
-
-
Save markusdybeck/4f7bfa9be1ce4f78f2489d4dd9889fcc to your computer and use it in GitHub Desktop.
Record with compact constructor
This file contains 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
public record ProductId(long id){ | |
public ProductId { | |
Require.that(id > 0); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment