Class Leg.Builder
- java.lang.Object
-
- com.anaptecs.jeaf.junit.openapi.base.Leg.Builder
-
- Enclosing class:
- Leg
public static class Leg.Builder extends java.lang.ObjectClass implements builder to create a new instance of classLeg.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()UseLeg.builder()instead of private constructor to create new builder.protectedBuilder(Leg pObject)UseLeg.builder(Leg)instead of private constructor to create new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Legbuild()Method creates a new instance of class Leg.LegbuildValidated()Method creates a new validated instance of class Leg.Leg.BuildersetStart(PlaceRef pStart)Method sets associationstart.Leg.BuildersetStop(PlaceRef pStop)Method sets associationstop.Leg.BuildersetStopovers(java.util.List<PlaceRef> pStopovers)Method sets associationstopovers.
-
-
-
Constructor Detail
-
Builder
protected Builder()
UseLeg.builder()instead of private constructor to create new builder.
-
Builder
protected Builder(Leg pObject)
UseLeg.builder(Leg)instead of private constructor to create new builder.
-
-
Method Detail
-
setStart
public Leg.Builder setStart(PlaceRef pStart)
Method sets associationstart.- Parameters:
pStart- Value to whichstartshould be set.- Returns:
Leg.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setStop
public Leg.Builder setStop(PlaceRef pStop)
Method sets associationstop.- Parameters:
pStop- Value to whichstopshould be set.- Returns:
Leg.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
setStopovers
public Leg.Builder setStopovers(java.util.List<PlaceRef> pStopovers)
Method sets associationstopovers.- Parameters:
pStopovers- Collection to whichstopoversshould be set.- Returns:
Leg.BuilderInstance of this builder to support chaining setters. Method never returns null.
-
build
public Leg build()
Method creates a new instance of class Leg. The object will be initialized with the values of the builder.- Returns:
- Leg Created object. The method never returns null.
-
buildValidated
public Leg buildValidated() throws javax.validation.ConstraintViolationException
Method creates a new validated instance of class Leg. The object will be initialized with the values of the builder and validated afterwards.- Returns:
- Leg 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.
-
-