public static class ProductCode.Builder extends Object
ProductCode.| Modifier | Constructor and Description |
|---|---|
protected |
Builder()
Use
ProductCode.builder() instead of private constructor to create new builder. |
protected |
Builder(ProductCode pObject)
Use
ProductCode.builder(ProductCode) instead of private constructor to create new builder. |
| Modifier and Type | Method and Description |
|---|---|
ProductCode |
build()
Method creates a new instance of class ProductCode.
|
ProductCode |
buildValidated()
Method creates a new validated instance of class ProductCode.
|
ProductCode.Builder |
setCode(int pCode)
Method sets attribute
code. |
protected Builder()
ProductCode.builder() instead of private constructor to create new builder.protected Builder(ProductCode pObject)
ProductCode.builder(ProductCode) instead of private constructor to create new builder.public ProductCode.Builder setCode(int pCode)
code.pCode - Value to which code should be set.ProductCode.Builder Instance of this builder to support chaining setters. Method never returns null.public ProductCode build()
public ProductCode 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.