public static class PostalAddress.Builder extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Builder()
Use
PostalAddress.builder() instead of private constructor to create new builder. |
protected |
Builder(PostalAddress pObject)
Use
PostalAddress.builder(PostalAddress) instead of private constructor to create new builder. |
| Modifier and Type | Method and Description |
|---|---|
PostalAddress |
build()
Method creates a new instance of class PostalAddress.
|
PostalAddress |
buildValidated()
Method creates a new validated instance of class PostalAddress.
|
PostalAddress.Builder |
setCity(String pCity)
Method sets the attribute "city".
|
PostalAddress.Builder |
setHouseNumber(String pHouseNumber)
Method sets the attribute "houseNumber".
|
PostalAddress.Builder |
setPostalCode(int pPostalCode)
Method sets the attribute "postalCode".
|
PostalAddress.Builder |
setStreet(String pStreet)
Method sets the attribute "street".
|
protected Builder()
PostalAddress.builder() instead of private constructor to create new builder.protected Builder(PostalAddress pObject)
PostalAddress.builder(PostalAddress) instead of private constructor to create new builder.public PostalAddress.Builder setStreet(String pStreet)
pStreet - Value to which the attribute "street" should be set.public PostalAddress.Builder setHouseNumber(String pHouseNumber)
pHouseNumber - Value to which the attribute "houseNumber" should be set.public PostalAddress.Builder setCity(String pCity)
pCity - Value to which the attribute "city" should be set.public PostalAddress.Builder setPostalCode(int pPostalCode)
pPostalCode - Value to which the attribute "postalCode" should be set.public PostalAddress build()
public PostalAddress buildValidated() throws javax.validation.ConstraintViolationException
javax.validation.ConstraintViolationException - in case that one or more validations for the created object failed.Copyright © 2022. All rights reserved.