Package hec.rss.model.globalvariable
Class StringGlobalVariable
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.globalvariable.BaseGlobalVariable
hec.rss.model.globalvariable.StringGlobalVariable
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,GlobalVariable,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
- See Also:
-
Field Summary
FieldsFields inherited from class hec.rss.model.globalvariable.BaseGlobalVariable
_altGvData, _networkFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendToSelectionList(String newStr) append a non-null unique String to the selection listclone()Creates a new object of the same class as this object.gets a description of the type of the global variablegetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.get the List of Strings in the Selection List.intintgetType()getValue()get the value of the String Global Variablecheck to see if the ScalarGlobalVariable has a valid valuebooleanbooleanis this String Global Variable a file path.booleanbooleandoes the String Global Variable use a selection ListvoidoutputReport(AlternativeInputReport report, org.jdom.Element myElem) called when created the network part of the alternative reportvoidsetCaseSensitive(boolean isCaseSensitive) voidsetCharacterSetType(CharacterSetType characterSetType) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetFilePath(boolean filePath) set if this String Global Variable is a file path.voidsetFreeForm(boolean isFreeForm) voidsetInvalidCharacters(List<Character> invalidCharacters) voidsetSelectionList(List<String> selectionList) set the new List of selections for the String Global Variablevoidset the value of the Output String Global VariableMethods inherited from class hec.rss.model.globalvariable.BaseGlobalVariable
finalizeCompute, getComputeMsg, getIsDataLocation, getNetwork, getUsageType, initializeGv, isInput, printToComputeLog, printToComputeWindow, setGlobalVariableData, setInput, setIsDataLocationMethods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.rss.model.globalvariable.GlobalVariable
finalizeCompute, getDescription, getIndex, getIsDataLocation, getName, getNetwork, initializeGv, isInput, setDescription, setGlobalVariableData, setIndex, setInput, setIsDataLocation, setName
-
Field Details
-
INVALID_CHARS_PROPERTY
- See Also:
-
-
Constructor Details
-
StringGlobalVariable
public StringGlobalVariable() -
StringGlobalVariable
-
-
Method Details
-
clone
Description copied from class:NamedTypeCreates a new object of the same class as this object.
It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No
constructor is called.- Specified by:
clonein interfaceGlobalVariable- Overrides:
clonein classBaseGlobalVariable
-
getCharacterSetType
-
setCharacterSetType
-
getType
- Specified by:
getTypein interfaceGlobalVariable
-
getValue
get the value of the String Global Variable- Returns:
- the String Global Variable's value
-
setValue
set the value of the Output String Global Variable- Parameters:
value- the new value
-
isFreeform
public boolean isFreeform() -
setFreeForm
public void setFreeForm(boolean isFreeForm) -
isCaseSensitive
public boolean isCaseSensitive() -
setCaseSensitive
public void setCaseSensitive(boolean isCaseSensitive) -
getInvalidCharacters
-
setInvalidCharacters
-
getSelectionList
get the List of Strings in the Selection List.- Returns:
- the Selection List
- See Also:
-
getSelectionListIndex
public int getSelectionListIndex()- Returns:
- -1 selection not found in list -2 not using selection list >0 index in list
-
getSelectListLength
public int getSelectListLength()- Returns:
-
appendToSelectionList
append a non-null unique String to the selection list- Parameters:
newStr- the String to add to the end of the selection list- See Also:
-
isSelection
public boolean isSelection()does the String Global Variable use a selection List- Returns:
- true if the String Global Variable is using a selection list
- See Also:
-
setSelectionList
set the new List of selections for the String Global Variable- Parameters:
selectionList- the new Selection List- See Also:
-
getDescriptiveText
Description copied from interface:GlobalVariablegets a description of the type of the global variable- Specified by:
getDescriptiveTextin interfaceGlobalVariable- Returns:
- descriptive text
-
hasValidValue
check to see if the ScalarGlobalVariable has a valid value- Specified by:
hasValidValuein interfaceGlobalVariable- Overrides:
hasValidValuein classBaseGlobalVariable- Returns:
- null if the value is valid or the ScalarGlobalVariable has no value
-
outputReport
called when created the network part of the alternative report- Specified by:
outputReportin interfaceGlobalVariable- Overrides:
outputReportin classBaseGlobalVariable- Parameters:
report- the alternative reportmyElem- the element for this global variable
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin classBaseGlobalVariable- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Overrides:
setFieldObjectin classBaseGlobalVariable- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-
isFilePath
public boolean isFilePath()is this String Global Variable a file path.- Returns:
-
setFilePath
public void setFilePath(boolean filePath) set if this String Global Variable is a file path.- Parameters:
filePath-
-