Created
November 22, 2025 15:47
-
-
Save trikitrok/5f97370b6a4f4cb74249ca95252ea748 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
| // some imports... | |
| public class ClaimBuilderX { | |
| // some fields... | |
| public static ClaimBuilderX aClaim() { | |
| return new ClaimBuilderX(); | |
| } | |
| private ClaimBuilderX() { | |
| // setting some default values | |
| } | |
| public ClaimBuilderX withClaimId(String number) { | |
| this.claimId = claimId(number); | |
| return this; | |
| } | |
| public ClaimBuilderX withStatus(ClaimStatus claimStatus) { | |
| this.status = claimStatus; | |
| return this; | |
| } | |
| // more setters... | |
| public Claim build() { | |
| return new Claim(claimId, companyId, description, claimDate, policyNumber, status); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment