Class SampleParentModelObject.Builder<T extends SampleParentModelObject>

java.lang.Object
com.powerupsoftwareengineering.java.immutable.model.builder.BuilderAbs<T>
com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<T>
com.powerupsoftwareengineering.java.immutable.model.sample.SampleParentModelObject.Builder<T>
Type Parameters:
T - The class the builder is constructing.
Direct Known Subclasses:
SampleChildModelObject.Builder
Enclosing class:
SampleParentModelObject

public abstract static class SampleParentModelObject.Builder<T extends SampleParentModelObject> extends com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<T>
The builder class provides the ability to populate all the values of a model object, validate if the model object content, and provide an immutable version of the model object.
  • Field Summary

    Fields inherited from class com.powerupsoftwareengineering.java.immutable.model.builder.BuilderAbs

    ERROR_MESSAGE_DELIMITER
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor that will initialize the validators.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyValues(T sampleParentModelObject)
     
    Accessor for the SampleParentModelObject.name member variable.
    void
     
    void
    Mutator for the SampleParentModelObject.name member variable.
    void
    setValues(T sampleParentModelObject)
     

    Methods inherited from class com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder

    getId, setId

    Methods inherited from class com.powerupsoftwareengineering.java.immutable.model.builder.BuilderAbs

    addValidator, build, getValidationErrors, isValid, validate

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Builder

      public Builder()
      Default constructor that will initialize the validators.
  • Method Details

    • reset

      public void reset()
      Overrides:
      reset in class com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<T extends SampleParentModelObject>
    • copyValues

      public void copyValues(T sampleParentModelObject)
      Overrides:
      copyValues in class com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<T extends SampleParentModelObject>
    • setValues

      public void setValues(T sampleParentModelObject)
      Overrides:
      setValues in class com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs.Builder<T extends SampleParentModelObject>
    • getName

      public String getName()
      Accessor for the SampleParentModelObject.name member variable.
      Returns:
      Current value of the SampleParentModelObject.name member variable.
    • setName

      public void setName(String name)
      Mutator for the SampleParentModelObject.name member variable.
      Parameters:
      name - New value of the SampleParentModelObject.name member variable.