Class PostalAddress.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.PostalAddress.Builder
-
- Enclosing class:
- PostalAddress
public static class PostalAddress.Builder extends java.lang.ObjectClass implements builder to create a new instance of classPostalAddress.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UsePostalAddress.builder()instead of private constructor to create new builder.protectedBuilder(PostalAddress pObject)UsePostalAddress.builder(PostalAddress)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PostalAddressbuild()Method creates a new instance of class PostalAddress.PostalAddressbuildValidated()Method creates a new validated instance of class PostalAddress.PostalAddress.BuildersetCity(java.lang.String pCity)Method sets attributecity.PostalAddress.BuildersetHouseNumber(java.lang.String pHouseNumber)Method sets attributehouseNumber.PostalAddress.BuildersetPostalCode(int pPostalCode)Method sets attributepostalCode.PostalAddress.BuildersetStreet(java.lang.String pStreet)Method sets attributestreet.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UsePostalAddress.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(PostalAddress pObject)
UsePostalAddress.builder(PostalAddress)instead of private constructor to create new builder.
-
-
Method Detail
-
setStreet
public PostalAddress.Builder setStreet(java.lang.String pStreet)
Method sets attributestreet.- Parameters:
pStreet- Value to whichstreetshould be set.- Returns:
PostalAddress.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setHouseNumber
public PostalAddress.Builder setHouseNumber(java.lang.String pHouseNumber)
Method sets attributehouseNumber.- Parameters:
pHouseNumber- Value to whichhouseNumbershould be set.- Returns:
PostalAddress.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setCity
public PostalAddress.Builder setCity(java.lang.String pCity)
Method sets attributecity.- Parameters:
pCity- Value to whichcityshould be set.- Returns:
PostalAddress.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setPostalCode
public PostalAddress.Builder setPostalCode(int pPostalCode)
Method sets attributepostalCode.- Parameters:
pPostalCode- Value to whichpostalCodeshould be set.- Returns:
PostalAddress.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public PostalAddress build()
Method creates a new instance of class PostalAddress. The object will be initialized with the values of the builder.- Returns:
- PostalAddress Created object. The method never returns null.
-
buildValidated
public PostalAddress buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class PostalAddress. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- PostalAddress 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.
-
-