edu.cmu.sei.aadl.model.property
Interface NumberValue

All Superinterfaces:
AObject, org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier, NumberOrPropertyReference, PropertyValue
All Known Subinterfaces:
IntegerValue, RealValue
All Known Implementing Classes:
IntegerValueImpl, NumberValueImpl, RealValueImpl

public interface NumberValue
extends PropertyValue, NumberOrPropertyReference

A representation of the model object 'Number Value'.

The following features are supported:

See Also:
PropertyPackage.getNumberValue()

Field Summary
static java.lang.String copyright
           
 
Method Summary
 NumberValue cloneAndInvert()
          Create a "clone" that inverts this value.
 NumberValue cloneNumber()
          Clone this number value.
 java.lang.String getNumberAsString()
          get number part of value as string number value converted to String without unit
 ParsedPropertyReference getParsedPropertyReference()
          returns parsed property reference object
 ParsedPropertyReference getParsedUnitLiteralReference()
          returns parsed unit literal reference object
 double getScaledValue()
          Get the scaled value of the number, this is the number's value multiplied by the number's unit's absolute factor.
 double getScaledValue(UnitLiteral target)
          Get the scaled value of the number, this is the number's value multiplied by the number's unit's scaling factor for the specified unit.
 UnitLiteral getUnitLiteral()
          Returns the value of the 'Unit Literal' reference
 java.lang.String getUnitLiteralName()
          returns unit literal name from either the unit literal object or the parsed name.
 java.lang.String getValueString()
          Returns the value of the 'Value String' attribute
 java.lang.Number getXValue()
          Get the value of the number.
 void setNewValue(java.lang.Number val)
          Set the value of the number.
 void setParsedPropertyReference(ParsedPropertyReference pr)
          sets parsed names for property reference
 void setParsedUnitLiteral(java.lang.String pr, java.lang.String file, int line)
          sets parsed name of unitliteral
 void setParsedUnitLiteralReference(ParsedPropertyReference pr)
          sets parsed names for unit literal reference
 void setUnitLiteral(UnitLiteral value)
          Sets the value of the 'Unit Literal' reference
 void setValueString(java.lang.String value)
          Sets the value of the 'Value String' attribute
 
Methods inherited from interface edu.cmu.sei.aadl.model.property.NumberOrPropertyReference
getNumberValue
 
Methods inherited from interface edu.cmu.sei.aadl.model.property.PropertyValue
evaluate, getValueAsString, instantiate, preEvaluate
 
Methods inherited from interface edu.cmu.sei.aadl.model.core.AObject
addComment, getAadlSpec, getAObjectRoot, getChildren, getComment, getContainingClassifier, getContainingClassifierNameSpace, getContainingComponentImpl, getContainingComponentType, getContainingPropertyAssociationDefinitionConstant, getContainingSubcomponent, getLocationReference, getReferencedObject, getSecondReferencedObject, getSystemInstance, setLocationReference, setLocationReference
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

copyright

static final java.lang.String copyright

See Also:
Constant Field Values
Method Detail

getUnitLiteral

UnitLiteral getUnitLiteral()
Returns the value of the 'Unit Literal' reference.

If the meaning of the 'Unit Literal' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Unit Literal' reference.
See Also:
setUnitLiteral(UnitLiteral), PropertyPackage.getNumberValue_UnitLiteral()

setUnitLiteral

void setUnitLiteral(UnitLiteral value)
Sets the value of the 'Unit Literal' reference.

Parameters:
value - the new value of the 'Unit Literal' reference.
See Also:
getUnitLiteral()

getXValue

java.lang.Number getXValue()
Get the value of the number.

Returns:
The value of the number literal.

getScaledValue

double getScaledValue()
Get the scaled value of the number, this is the number's value multiplied by the number's unit's absolute factor. If the number doesn't have a unit then the scaled value is the same as the number's value.


getScaledValue

double getScaledValue(UnitLiteral target)
Get the scaled value of the number, this is the number's value multiplied by the number's unit's scaling factor for the specified unit. If the number doesn't have a unit then the scaled value is the same as the number's value.

Parameters:
target - UnitLiteral

setNewValue

void setNewValue(java.lang.Number val)
Set the value of the number.

Parameters:
val - The value.

getValueString

java.lang.String getValueString()
Returns the value of the 'Value String' attribute.

If the meaning of the 'Value String' attribute isn't clear, there really should be more of a description here...

Returns:
the value of the 'Value String' attribute.
See Also:
setValueString(String), PropertyPackage.getNumberValue_ValueString()

getNumberAsString

java.lang.String getNumberAsString()
get number part of value as string number value converted to String without unit

Returns:
String

setValueString

void setValueString(java.lang.String value)
Sets the value of the 'Value String' attribute.

Parameters:
value - the new value of the 'Value String' attribute.
See Also:
getValueString()

setParsedPropertyReference

void setParsedPropertyReference(ParsedPropertyReference pr)
sets parsed names for property reference

Parameters:
pr - parsed property reference object

getParsedPropertyReference

ParsedPropertyReference getParsedPropertyReference()
returns parsed property reference object

Returns:
ParsedPropertyReference of unit literal

setParsedUnitLiteralReference

void setParsedUnitLiteralReference(ParsedPropertyReference pr)
sets parsed names for unit literal reference

Parameters:
pr - parsed property reference object

setParsedUnitLiteral

void setParsedUnitLiteral(java.lang.String pr,
                          java.lang.String file,
                          int line)
sets parsed name of unitliteral

Parameters:
pr - parsed of unitliteral as string
file - file name as string
line - line number as string

getParsedUnitLiteralReference

ParsedPropertyReference getParsedUnitLiteralReference()
returns parsed unit literal reference object

Returns:
ParsedPropertyReference

getUnitLiteralName

java.lang.String getUnitLiteralName()
returns unit literal name from either the unit literal object or the parsed name. reutnrs empty string if neither is found.


cloneNumber

NumberValue cloneNumber()
Clone this number value.


cloneAndInvert

NumberValue cloneAndInvert()
Create a "clone" that inverts this value. It is a cloen in the sense that it represent a number from the same source location.