Package org.eclipse.esmf.metamodel.impl
Class DefaultUnit
java.lang.Object
org.eclipse.esmf.metamodel.impl.ModelElementImpl
org.eclipse.esmf.metamodel.impl.DefaultUnit
- All Implemented Interfaces:
Comparable<ModelElementImpl>,ModelElement,NamedElement,Unit
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultUnit(MetaModelBaseAttributes metaModelBaseAttributes, Optional<String> symbol, Optional<String> code, Optional<String> referenceUnit, Optional<String> conversionFactor, Set<QuantityKind> quantityKinds) -
Method Summary
Modifier and TypeMethodDescription<T,C> T accept(AspectVisitor<T, C> visitor, C context) Accepts an Aspect visitorbooleangetCode()Returns the unit's common code, as described in UNECE Recommendation 20Return the unit's conversion factor for unit conversionsReturn the unit's quantity kindsReturn the unit's reference unit for unit conversionsReturns the unit's symbolinthashCode()toString()Methods inherited from class org.eclipse.esmf.metamodel.impl.ModelElementImpl
compareTo, getAspectModelUrn, getDescriptions, getMetaModelVersion, getName, getPreferredNames, getSee, hasSyntheticNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.esmf.metamodel.ModelElement
as, getMetaModelVersion, isMethods inherited from interface org.eclipse.esmf.metamodel.NamedElement
getAspectModelUrn, getDescription, getDescriptions, getName, getPreferredName, getPreferredNames, getSee, hasSyntheticName
-
Constructor Details
-
DefaultUnit
-
-
Method Details
-
getSymbol
Description copied from interface:UnitReturns the unit's symbol -
getCode
Description copied from interface:UnitReturns the unit's common code, as described in UNECE Recommendation 20 -
getReferenceUnit
Description copied from interface:UnitReturn the unit's reference unit for unit conversions- Specified by:
getReferenceUnitin interfaceUnit
-
getConversionFactor
Description copied from interface:UnitReturn the unit's conversion factor for unit conversions- Specified by:
getConversionFactorin interfaceUnit
-
getQuantityKinds
Description copied from interface:UnitReturn the unit's quantity kinds- Specified by:
getQuantityKindsin interfaceUnit
-
equals
- Overrides:
equalsin classModelElementImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classModelElementImpl
-
accept
Accepts an Aspect visitor- Specified by:
acceptin interfaceModelElement- Type Parameters:
T- The result type of the traversal operationC- The context of the visitor traversal- Parameters:
visitor- The visitor to accept
-
toString
-