edu.cmu.sei.aadl.aadl2
Interface NumberValue

All Superinterfaces:
AObject, Element, org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier, PropertyExpression, PropertyValue
All Known Subinterfaces:
IntegerLiteral, RealLiteral
All Known Implementing Classes:
IntegerLiteralImpl, NumberValueImpl, RealLiteralImpl

public interface NumberValue
extends PropertyValue

A representation of the model object 'Number Value'.

The following features are supported:

See Also:
Aadl2Package.getNumberValue()

Field Summary
 
Fields inherited from interface edu.cmu.sei.aadl.aadl2.parsesupport.AObject
copyright
 
Method Summary
 NumberValue cloneAndInvert()
          Create a "clone" that inverts this value.
 NumberValue cloneNumber()
          Clone this number value.
 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 getUnit()
          Returns the value of the 'Unit' reference
 java.lang.String getValueString()
          Returns the value of the 'Value String' attribute
 void setUnit(UnitLiteral value)
          Sets the value of the 'Unit' reference
 void setValue(java.lang.String s)
           
 void setValueString(java.lang.String value)
          Sets the value of the 'Value String' attribute
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.PropertyExpression
evaluate
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.Element
allOwnedElements, createOwnedComment, getChildren, getContainingClassifier, getContainingComponentImpl, getElementRoot, getOwnedComments, getOwnedElements, getOwner, has_owner, mustBeOwned, not_own_self
 
Methods inherited from interface edu.cmu.sei.aadl.aadl2.parsesupport.AObject
getLocationReference, 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
 

Method Detail

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), Aadl2Package.getNumberValue_ValueString()

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()

getUnit

UnitLiteral getUnit()
Returns the value of the 'Unit' reference.

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

Returns:
the value of the 'Unit' reference.
See Also:
setUnit(UnitLiteral), Aadl2Package.getNumberValue_Unit()

setUnit

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

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

setValue

void setValue(java.lang.String s)
Parameters:
s - string with number to parse

cloneAndInvert

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

Returns:

cloneNumber

NumberValue cloneNumber()
Clone this number value.

Returns:

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.

Returns:
the value scaled to the base unit

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 - the target unit
Returns:
the value scaled to the target unit