public static class BankAccount.Builder extends Object
BankAccount.| Modifier | Constructor and Description |
|---|---|
protected |
Builder()
Use
BankAccount.builder() instead of private constructor to create new builder. |
protected |
Builder(BankAccount pObject)
Use
BankAccount.builder(BankAccount) instead of private constructor to create new builder. |
| Modifier and Type | Method and Description |
|---|---|
BankAccount |
build()
Method creates a new instance of class BankAccount.
|
BankAccount |
buildValidated()
Method creates a new validated instance of class BankAccount.
|
BankAccount.Builder |
setIban(String pIban)
Method sets attribute
iban. |
protected Builder()
BankAccount.builder() instead of private constructor to create new builder.protected Builder(BankAccount pObject)
BankAccount.builder(BankAccount) instead of private constructor to create new builder.public BankAccount.Builder setIban(String pIban)
iban.pIban - Value to which iban should be set.BankAccount.Builder Instance of this builder to support chaining setters. Method never returns null.public BankAccount build()
public BankAccount buildValidated() throws javax.validation.ConstraintViolationException
javax.validation.ConstraintViolationException - in case that one or more validations for the created object failed.Copyright © 2023. All rights reserved.