|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmetricsOverlay.model.mappings.Mapping
public class Mapping
This class provides a model implementation of a mapping. It holds two components, a metric and a augmentation and contains methods for interpolating between the two disjunct concepts.
Constructor Summary | |
---|---|
Mapping(java.lang.String name)
Basic constructor. |
|
Mapping(java.lang.String mappingName,
boolean stubMapping)
Basic constructor, can be used to create a stub mapping when little information on the mapping is know. |
|
Mapping(java.lang.String name,
Metric met,
Augmentation aug,
InterpolationStrategy iStrat,
MappingState state,
boolean editable)
Full Constructor. |
|
Mapping(java.lang.String mapName,
java.lang.String augName,
java.util.Map<java.lang.String,java.lang.String> properties)
Deprecated. |
Method Summary | |
---|---|
void |
addPropertyValue(java.lang.String name,
java.lang.String value)
Deprecated. |
boolean |
canChangeEditableStatus()
|
boolean |
canEdit()
|
void |
clearAugmentation()
Clears an existing augmentation from this mapping. |
void |
clearMetric()
Clears an existing metric from this mapping. |
int |
compareTo(Mapping o)
|
Augmentation |
getAugmentation()
Gets the current augmentation that is in use with this mapping. |
int |
getInterpolatedValue(java.lang.String value)
This method takes whatever value has been provided to a metrics section and turns it into a value for use by the augmentation algorithm. |
InterpolationStrategy |
getInterpolationType()
Gets the currently used interpolation strategy. |
MappingState |
getMappingState()
Gets the current state of this mapping. |
Metric |
getMetric()
Returns the metric currently belonging to this mapping. |
java.lang.String |
getName()
Gets the set name of the mapping. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Deprecated. |
java.lang.String |
getPropertyValue(java.lang.String name)
Deprecated. |
boolean |
isUsable()
Determines if this metric is usable. |
void |
setAugmentation(Augmentation augmentation)
Sets a particular augmentation to use with this mapping. |
void |
setEditable(boolean editable)
If allowed, this sets the new editable status. |
void |
setInterpolationType(InterpolationStrategy is)
Sets a new interpolation strategy. |
void |
setMappingState(MappingState state)
Sets the current state of this mapping. |
void |
setMetric(Metric metric)
Sets the metric to be used by this mapping algorithm. |
void |
setName(java.lang.String name)
Sets the name of the mapping. |
java.lang.String |
toString()
This toString method provides details of the mapping and the metric and augmentation it is comprised of. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public Mapping(java.lang.String mapName, java.lang.String augName, java.util.Map<java.lang.String,java.lang.String> properties)
mapName
- the name of the mapping.augName
- the standard name for the augmentationproperties
- a map describing a set of properties.public Mapping(java.lang.String mappingName, boolean stubMapping)
mappingName
- the name of the mapping.stubMapping
- whether the mapping is a stub or not.public Mapping(java.lang.String name)
name
- the name of the mapping.public Mapping(java.lang.String name, Metric met, Augmentation aug, InterpolationStrategy iStrat, MappingState state, boolean editable)
name
- the name of the mapping.Method Detail |
---|
public int getInterpolatedValue(java.lang.String value)
value
- the value stored by the metric section
public java.lang.String getName()
getName
in interface INameable
public void setName(java.lang.String name)
setName
in interface INameable
name
- the unique name to be set.public MappingState getMappingState()
public void setMappingState(MappingState state)
state
- the new state.public Metric getMetric()
public void setMetric(Metric metric)
metric
- the metric to be used.public void clearMetric()
public Augmentation getAugmentation()
public void setAugmentation(Augmentation augmentation)
augmentation
- the augmentation to use.public void clearAugmentation()
public InterpolationStrategy getInterpolationType()
LinearIStrategy
will be created by
default.
public void setInterpolationType(InterpolationStrategy is)
is
- the strategy to use.public boolean canChangeEditableStatus()
canChangeEditableStatus
in interface IEditable
public boolean canEdit()
canEdit
in interface IEditable
public void setEditable(boolean editable)
IEditable
setEditable
in interface IEditable
editable
- the new status.public boolean isUsable()
true
if usable, else false
.public int compareTo(Mapping o)
compareTo
in interface java.lang.Comparable<Mapping>
public java.lang.String toString()
toString
in class java.lang.Object
@Deprecated public java.lang.String getPropertyValue(java.lang.String name)
name
- the name of the property to be located
@Deprecated public void addPropertyValue(java.lang.String name, java.lang.String value)
name
- the name of the propertyvalue
- the value of the property@Deprecated public java.util.Map<java.lang.String,java.lang.String> getProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |