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.Object
Base element for model elements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CAPABILITY_SEPARATOR
The capability separator.protected java.lang.String
description
The element description.protected java.lang.String
name
The element name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Test if objects are equal.java.lang.String
getCapabilityName()
Get the capability name for an element.java.lang.String
getDescription()
Get the description.java.lang.String
getElementName()
Get the local name for an element, i.e. without capability prefix, if any.java.lang.String
getName()
Get the name.int
hashCode()
Get the hashcode.static java.lang.String
internalName(java.lang.String name)
Convert a name to internal form for capability separator.void
setDescription(java.lang.String description)
Set the description.void
setFlatName(java.lang.String name)
Set the flat name, i.e. do not replay separator chars.void
setName(java.lang.String name)
Set the name.java.lang.String
toString()
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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test if objects are equal.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
Create a string representation.- Overrides:
toString
in classjava.lang.Object
-
internalName
public static java.lang.String internalName(java.lang.String name)
Convert a name to internal form for capability separator.
-
-