Class BankAccount.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.BankAccount.Builder
-
- Enclosing class:
- BankAccount
public static class BankAccount.Builder extends java.lang.ObjectClass implements builder to create a new instance of classBankAccount.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseBankAccount.builder()instead of private constructor to create new builder.protectedBuilder(BankAccount pObject)UseBankAccount.builder(BankAccount)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BankAccountbuild()Method creates a new instance of class BankAccount.BankAccountbuildValidated()Method creates a new validated instance of class BankAccount.BankAccount.BuildersetIban(java.lang.String pIban)Method sets attributeiban.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseBankAccount.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(BankAccount pObject)
UseBankAccount.builder(BankAccount)instead of private constructor to create new builder.
-
-
Method Detail
-
setIban
public BankAccount.Builder setIban(java.lang.String pIban)
Method sets attributeiban.- Parameters:
pIban- Value to whichibanshould be set.- Returns:
BankAccount.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public BankAccount build()
Method creates a new instance of class BankAccount. The object will be initialized with the values of the builder.- Returns:
- BankAccount Created object. The method never returns null.
-
buildValidated
public BankAccount buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class BankAccount. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- BankAccount Created and validated object. The method never returns null.
- Throws:
javax.validation.ConstraintViolationException- in case that one or more validations for the created object failed.
-
-