public class UnitCategory extends Attribute
BaseUnit
Red (liuxj) |
Red (liuxj) |
NamedObj.ContainedObjectsIterator
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
UnitCategory()
Construct a unit category in the default workspace with an empty string
as its name.
|
UnitCategory(NamedObj container,
java.lang.String name)
Construct a unit category property with the given name contained by
the specified
entity.
|
UnitCategory(Workspace workspace)
Construct an attribute in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
BaseUnit |
getBaseUnit()
Return the base unit.
|
void |
setContainer(NamedObj container)
Set the container and register this object in to the system wide
unit system by calling
UnitUtilities.registerUnitCategory(String) . |
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public UnitCategory()
public UnitCategory(Workspace workspace)
workspace
- The workspace that will list the attribute.public UnitCategory(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
This constructor adds the created object to the system wide
UnitSystem by calling
UnitUtilities.registerUnitCategory(String)
container
- The container.name
- The name of this attribute.IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.NameDuplicationException
- If the name coincides with
an attribute already in the container.public BaseUnit getBaseUnit()
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
UnitUtilities.registerUnitCategory(String)
.setContainer
in class Attribute
container
- The container to attach this attribute to.
The type of the container must be an instances of BaseUnit.IllegalActionException
- If Attribute.setContainer()
throws it.NameDuplicationException
- If Attribute.setContainer()
throws it.Attribute.getContainer()