public class Parameter
extends java.lang.Object
Constructor and Description |
---|
Parameter() |
Modifier and Type | Method and Description |
---|---|
void |
fromEntry(Entry entry)
This operation will load a Parameter from an Entry following the same
rules as in toEntry().
|
void |
fromString(java.lang.String paramString)
This operation reads the parameter from a string of the form name =
defaultValue and loads the name and default value.
|
java.lang.String |
getComment()
This method returns the parameter's comment, if it has one.
|
java.lang.String |
getCpp_type()
This operation retrieves the C++ type of the parameter.
|
java.lang.String |
getDefault()
This operation retrieves the default value of the parameter.
|
java.lang.String |
getDescription()
This operation retrieves the description of the parameter.
|
java.lang.String |
getGroup_name()
This operation retrieves the group name of the parameter.
|
java.lang.String |
getName()
This operation retrieves the name of the parameter.
|
java.util.ArrayList<java.lang.String> |
getOptions()
This operation retrieves the list of options (if any)
|
boolean |
isEnabled()
Returns if the parameter is enabled or not (ie.
|
boolean |
isRequired()
This operation indicates if the parameter is required.
|
void |
setComment(java.lang.String comment)
This method sets the parameter's comment.
|
void |
setCpp_type(java.lang.String type)
This operation sets the C++ type of the parameter.
|
void |
setDefault(java.lang.String defaultValue)
This operation sets the default value of the parameter.
|
void |
setDescription(java.lang.String desc)
This operation sets the description of the parameter.
|
void |
setEnabled(boolean flag)
This method sets if the parameter is currently enabled (ie.
|
void |
setGroup_name(java.lang.String gName)
This operation sets the group name of the parameter.
|
void |
setName(java.lang.String paramName)
This operation sets the name of the parameter.
|
void |
setOptions(java.lang.String optionsStr)
This operation sets options of the parameter (if any).
|
void |
setRequired(boolean flag)
This operation sets specifies whether or not the parameter is required.
|
Entry |
toEntry()
This operation returns this parameter as an ICE Entry with
AllowedValueType.Undefined.
|
java.lang.String |
toString()
This operation writes the name and value of the parameter to a string as
"name = value" (minus the quotations of course).
|
public java.lang.String getName()
public boolean isRequired()
public boolean isEnabled()
public java.lang.String getDefault()
public java.lang.String getComment()
public java.lang.String getCpp_type()
public java.util.ArrayList<java.lang.String> getOptions()
public java.lang.String getGroup_name()
public java.lang.String getDescription()
public void setName(java.lang.String paramName)
paramName
- The namepublic void setRequired(boolean flag)
flag
- True if required, false if notpublic void setEnabled(boolean flag)
flag
- True if the parameter is enabled, false if it is commented
out.public void setDefault(java.lang.String defaultValue)
defaultValue
- The default valuepublic void setComment(java.lang.String comment)
comment
- public void setCpp_type(java.lang.String type)
type
- The typepublic void setOptions(java.lang.String optionsStr)
optionsStr
- A string of options, with each separated by any amount of
whitespace.public void setGroup_name(java.lang.String gName)
gName
- The group namepublic void setDescription(java.lang.String desc)
desc
- The descriptionpublic Entry toEntry()
public java.lang.String toString()
toString
in class java.lang.Object
public void fromEntry(Entry entry)
This operation will load a Parameter from an Entry following the same rules as in toEntry(). This operation should ONLY be used to convert an Entry to a Parameter for writing a MOOSE input file.
The parameter can not reconstruct the cpp_type from the Entry, so only the name, description and value (stored as default) are converted.
entry
- The Entry to load into the Parameter.public void fromString(java.lang.String paramString)
This operation reads the parameter from a string of the form name = defaultValue and loads the name and default value.
If the string is invalid then the parameter will remain unchanged.
paramString
- The parameter as a string.