Package jadex.bdiv3.model
Class MElement
- java.lang.Object
-
- jadex.bdiv3.model.MElement
-
- Direct Known Subclasses:
MBelief,MCapability,MCapabilityReference,MCondition,MConfigBeliefElement,MConfigParameterElement,MConfiguration,MElementRef,MParameter,MParameterElement
public class MElement extends java.lang.ObjectBase element for model elements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCAPABILITY_SEPARATORThe capability separator.protected java.lang.StringdescriptionThe element description.protected java.lang.StringnameThe element name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if objects are equal.java.lang.StringgetCapabilityName()Get the capability name for an element.java.lang.StringgetDescription()Get the description.java.lang.StringgetElementName()Get the local name for an element, i.e.java.lang.StringgetName()Get the name.inthashCode()Get the hashcode.static java.lang.StringinternalName(java.lang.String name)Convert a name to internal form for capability separator.voidsetDescription(java.lang.String description)Set the description.voidsetFlatName(java.lang.String name)Set the flat name, i.e.voidsetName(java.lang.String name)Set the name.java.lang.StringtoString()Create a string representation.
-
-
-
Field Detail
-
CAPABILITY_SEPARATOR
public static final java.lang.String CAPABILITY_SEPARATOR
The capability separator.- See Also:
- Constant Field Values
-
name
protected java.lang.String name
The element name.
-
description
protected java.lang.String description
The element description.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name.- Returns:
- The name.
-
setName
public void setName(java.lang.String name)
Set the name.- Parameters:
name- The name to set.
-
setFlatName
public void setFlatName(java.lang.String name)
Set the flat name, i.e. do not replay separator chars.- Parameters:
name- The name to set.
-
getDescription
public java.lang.String getDescription()
Get the description.- Returns:
- The description.
-
setDescription
public void setDescription(java.lang.String description)
Set the description.- Parameters:
description- The description to set.
-
getCapabilityName
public java.lang.String getCapabilityName()
Get the capability name for an element.- Returns:
- The capability name or null for global elements.
-
getElementName
public java.lang.String getElementName()
Get the local name for an element, i.e. without capability prefix, if any.- Returns:
- The local element name.
-
hashCode
public int hashCode()
Get the hashcode.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test if objects are equal.- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Create a string representation.- Overrides:
toStringin classjava.lang.Object
-
internalName
public static java.lang.String internalName(java.lang.String name)
Convert a name to internal form for capability separator.
-
-