Class SampleModelObject
java.lang.Object
com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
com.powerupsoftwareengineering.java.immutable.model.sample.SampleModelObject
- All Implemented Interfaces:
com.powerupsoftwareengineering.java.immutable.model.ModelObject, Serializable
public final class SampleModelObject
extends com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
A
SampleModelObject is a sample model object designed to show how to use the Immutable model object functionality.
It features use of both build and parameter validators.
For parameter validators, it uses the soft length filter.
See SampleChildModelObject for an example of the hard length filter.
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
Fields -
Method Summary
Methods inherited from class com.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
getId
-
Field Details
-
NAME_MAX_LENGTH
public static final int NAME_MAX_LENGTHThe max length of the object.- See Also:
-
-
Method Details
-
getName
Accessor for thenamemember variable.- Returns:
- Current value of the
namemember variable.
-
getOrder
public int getOrder()Accessor for theordermember variable.- Returns:
- Current value of the
ordermember variable.
-
equals
- Overrides:
equalsin classcom.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
-
toString
- Overrides:
toStringin classcom.powerupsoftwareengineering.java.immutable.model.ModelObjectAbs
-