Construct a base unit with the given name contained by
the specified entity. The container argument must not be null, or a
NullPointerException will be thrown. This attribute will use the
workspace of the container for synchronization and version counts.
If the name argument is null, then the name is set to the empty string.
Increment the version of the workspace.
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.
Get the token contained by this base unit. The token contains
the unit information specified by the unit category property.
Calling this method
will trigger evaluation of the expression, if the value has been
given by setExpression(). Notice the evaluation of the expression
can trigger an exception if the expression is not valid, or if the
result of the expression violates type constraints specified by
setTypeEquals() or setTypeAtMost(), or if the result of the expression
is null and there are other variables that depend on this one.
The returned value will be null if neither an expression nor a
token has been set, or either has been set to null.
The token contained by this variable converted to the
type of this variable, or null if there is none.
IllegalActionException - If the expression cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.