Class PModeProperty
java.lang.Object
com.helger.phase4.model.pmode.leg.PModeProperty
- All Implemented Interfaces:
com.helger.base.name.IHasName,com.helger.base.state.IMandatoryIndicator,com.helger.text.IHasDescription,Serializable
@NotThreadSafe
@MustImplementEqualsAndHashcode
public class PModeProperty
extends Object
implements com.helger.base.name.IHasName, com.helger.text.IHasDescription, com.helger.base.state.IMandatoryIndicator, Serializable
A property is a data structure that consists of four values: the property name, which can be used
as an identifier of the property (e.g. a required property named "messagetype" can be noted as:
Properties[messagetype].required="true"); the property description; the property
data type; and a Boolean value, indicating whether the property is expected or optional, within
the User message. This parameter controls the contents of the element
eb:Messaging/eb:UserMessage/eb:MessageProperties.- Author:
- Philip Helger
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPModeProperty(@NonNull @Nonempty String sName, @Nullable String sDescription, @NonNull @Nonempty String sDataType, @NonNull com.helger.base.state.EMandatory eMandatory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal @NonNull @Nonempty Stringfinal @Nullable StringThe PMode property description.final @NonNull @Nonempty StringgetName()The PMode property name.inthashCode()final booleanfinal booleanfinal @NonNull com.helger.base.state.EChangesetDataType(@NonNull @Nonempty String sDataType) Set the property data type.final @NonNull com.helger.base.state.EChangesetDescription(@Nullable String sDescription) Set the description.final @NonNull com.helger.base.state.EChangesetMandatory(boolean bMandatory) Set the property mandatory or optional.final @NonNull com.helger.base.state.EChangesetMandatory(@NonNull com.helger.base.state.EMandatory eMandatory) Set the property mandatory or optional.final @NonNull com.helger.base.state.EChangeSet the property name.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.text.IHasDescription
hasDescriptionMethods inherited from interface com.helger.base.state.IMandatoryIndicator
and, or
-
Field Details
-
DATA_TYPE_STRING
- See Also:
-
DEFAULT_MANDATORY
public static final boolean DEFAULT_MANDATORY- See Also:
-
-
Constructor Details
-
PModeProperty
public PModeProperty() -
PModeProperty
-
-
Method Details
-
getName
The PMode property name.- Specified by:
getNamein interfacecom.helger.base.name.IHasName
-
setName
public final @NonNull com.helger.base.state.EChange setName(@Nonempty @NonNull @Nonempty String sName) Set the property name.- Parameters:
sName- Property name. May neither benullnor empty.- Returns:
EChange- Since:
- 0.12.0
-
getDescription
The PMode property description.- Specified by:
getDescriptionin interfacecom.helger.text.IHasDescription
-
setDescription
Set the description.- Parameters:
sDescription- The description. May benull.- Returns:
EChange
-
getDataType
- Returns:
- The PMode property data type. May neither be
nullnor empty.
-
setDataType
public final @NonNull com.helger.base.state.EChange setDataType(@Nonempty @NonNull @Nonempty String sDataType) Set the property data type.- Parameters:
sDataType- Property data type. May neither benullnor empty.- Returns:
EChange- Since:
- 0.12.0
-
isMandatory
public final boolean isMandatory()- Specified by:
isMandatoryin interfacecom.helger.base.state.IMandatoryIndicator- Returns:
trueif the PMode property is mandatory,falseif it is optional.
-
isOptional
public final boolean isOptional()- Specified by:
isOptionalin interfacecom.helger.base.state.IMandatoryIndicator- Returns:
trueif the PMode property is optional,falseif it is mandatory.
-
setMandatory
public final @NonNull com.helger.base.state.EChange setMandatory(@NonNull com.helger.base.state.EMandatory eMandatory) Set the property mandatory or optional.- Parameters:
eMandatory- Property mandatory state. May not benull.- Returns:
EChange- Since:
- 0.12.0
-
setMandatory
public final @NonNull com.helger.base.state.EChange setMandatory(boolean bMandatory) Set the property mandatory or optional.- Parameters:
bMandatory-truefor mandatory,falsefor optional.- Returns:
EChange- Since:
- 0.12.0
-
equals
-
hashCode
public int hashCode() -
toString
-