Class SampleChildModelObject
java.lang.Object
com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
com.powerupsoftwareengineering.java.immutable.model.sample.SampleParentModelObject
com.powerupsoftwareengineering.java.immutable.model.sample.SampleChildModelObject
- All Implemented Interfaces:
com.powerupsoftwareengineering.java.immutable.model.ModelObject, Serializable
A
SampleChildModelObject is a sample of a child class that uses a common parent which uses the immutable model object pattern. It
also contains an example of a hard length parameter validator.
This object is immutable. To modify use the object's builder class. You can use the @{link Builder#copyValues} method to initialize the builder to the original values.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe 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
FieldsModifier and TypeFieldDescriptionstatic final intThe max length of the object type.Fields inherited from class SampleParentModelObject
NAME_MAX_LENGTH -
Method Summary
Methods inherited from class SampleParentModelObject
getNameMethods inherited from class com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
getId
-
Field Details
-
TYPE_MAX_LENGTH
public static final int TYPE_MAX_LENGTHThe max length of the object type.- See Also:
-
-
Method Details
-
getType
Accessor for thetypemember variable.- Returns:
- Current value of the
typemember variable.
-
equals
- Overrides:
equalsin classSampleParentModelObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classSampleParentModelObject
-
toString
- Overrides:
toStringin classSampleParentModelObject
-