Package com.comsol.model
Interface ExpressionBase
-
- All Superinterfaces:
ModelEntity
,PrimitiveModelEntity
- All Known Subinterfaces:
ElementSet
,Expr
,ExpressionEntity
,Init
,ModelParam
,ModelParamGroup
,ParamBase
,ResultParam
public interface ExpressionBase extends ModelEntity
Base interface for variable collections and parameters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExpressionBase
clear()
Removes all variables.java.lang.String
descr(java.lang.String var)
Returns a variable expression.ExpressionBase
descr(java.lang.String var, java.lang.String descr)
Returns a variable expression.java.lang.String
get(java.lang.String var)
Returns a variable expression.ExpressionBase
remove(java.lang.String var)
Removes a variable.ExpressionBase
remove(java.lang.String[] vars)
Removes variables.ExpressionBase
rename(java.lang.String oldName, java.lang.String newName)
Renames a variable without changing the expression or description.ExpressionBase
set(java.lang.String var, double expr)
Sets a variable name and expression.ExpressionBase
set(java.lang.String var, double expr, java.lang.String descr)
Sets a variable name and expression.ExpressionBase
set(java.lang.String var, java.lang.String expr)
Sets a variable name and expression.ExpressionBase
set(java.lang.String var, java.lang.String expr, java.lang.String descr)
Sets a variable name and expression.java.lang.String[]
varnames()
Returns all variable names.-
Methods inherited from interface com.comsol.model.ModelEntity
active, author, author, comments, comments, dateCreated, dateModified, docMarker, docMarker, help, help, icon, isactive, isActive, label, label, lastModifiedBy, model, model, name, name, resetAuthor, scope, tag, tag, timeCreated, timeModified, version, version
-
Methods inherited from interface com.comsol.model.PrimitiveModelEntity
getContainer, getDisplayString, resolveModelPath
-
-
-
-
Method Detail
-
clear
ExpressionBase clear()
Removes all variables.- Returns:
- Base expression.
-
descr
java.lang.String descr(java.lang.String var)
Returns a variable expression.- Parameters:
var
- Variable name.- Returns:
- Variable expression.
-
descr
ExpressionBase descr(java.lang.String var, java.lang.String descr)
Returns a variable expression.- Parameters:
var
- Variable name.descr
- Variable description.- Returns:
- Base expression.
-
get
java.lang.String get(java.lang.String var)
Returns a variable expression.- Parameters:
var
- Variable name.- Returns:
- Variable expression.
-
remove
ExpressionBase remove(java.lang.String var)
Removes a variable.- Parameters:
var
- Variable name.- Returns:
- Base expression.
-
remove
ExpressionBase remove(java.lang.String[] vars)
Removes variables.- Parameters:
vars
- Variable names.- Returns:
- Base expression.
-
rename
ExpressionBase rename(java.lang.String oldName, java.lang.String newName)
Renames a variable without changing the expression or description.- Parameters:
oldName
- Old variable name.newName
- New variable name.- Returns:
- Base expression.
-
set
ExpressionBase set(java.lang.String var, java.lang.String expr)
Sets a variable name and expression.- Parameters:
var
- Variable name.expr
- Variable expression.- Returns:
- Base expression.
-
set
ExpressionBase set(java.lang.String var, double expr)
Sets a variable name and expression.- Parameters:
var
- Variable name.expr
- Variable expression.- Returns:
- Base expression.
-
set
ExpressionBase set(java.lang.String var, java.lang.String expr, java.lang.String descr)
Sets a variable name and expression.- Parameters:
var
- Variable name.expr
- Variable expression.descr
- Variable description.- Returns:
- Base expression.
-
set
ExpressionBase set(java.lang.String var, double expr, java.lang.String descr)
Sets a variable name and expression.- Parameters:
var
- Variable name.expr
- Variable expression.descr
- Variable description.- Returns:
- Base expression.
-
varnames
java.lang.String[] varnames()
Returns all variable names.- Returns:
- List of variable names.
-
-