UniVista.support
Class Variable

java.lang.Object
  |
  +--UniVista.support.Variable
All Implemented Interfaces:
java.lang.Cloneable, ConsistencyCheck, java.io.Serializable
Direct Known Subclasses:
VariableBean

public class Variable
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable, ConsistencyCheck

Holds information needed for all variables such as their type

See Also:
Serialized Form

Field Summary
protected  java.lang.String description
           
protected  java.lang.String documentationURL
           
protected  java.lang.String name
           
protected  java.lang.String namelistGroup
           
protected  int type
           
protected  boolean typedVariable
           
static java.lang.String[] typeNames
           
static int UV_ARRAY
           
static int UV_BOOLEAN
           
static int UV_COMPLEX
           
static int UV_FLOAT
           
static int UV_LONG
           
static int UV_SHORT
           
static int UV_STRING
           
static int UV_TYPE
          The following hold public constants for UniVista variable types
protected  boolean variableOptionsUI
           
protected  boolean variableUI
           
 
Constructor Summary
Variable()
          Default zero-argument constructor.
 
Method Summary
 java.lang.Object clone()
          clones the variable object
 void consistencyCheck()
          This method tests all the constraints to see that a value meets its conditions.
 void duplicate(Variable newInfo)
          duplicate the information from another Variable into this one
 boolean equals(java.lang.Object obj)
          Compare two variable objects
 java.lang.String getDescription()
          Get and set the short description
 java.lang.String getDocumentationURL()
          Get and set the documentation URL
 java.lang.String getName()
          Get and set the variable's name
 java.lang.String getNamelistGroup()
          The following methods get and set a string intended for use to indicate what namelist group a variable is in, although it can contain anything the programmer wants
 int getType()
          Get and set the fundamental type
 boolean isLowerBoundEnabled()
           
 boolean isTypedVariable()
          return whether or not the object implements the typed variable interface
 boolean isUpperBoundEnabled()
           
 boolean isVariableOptionsUI()
          return whether or not the object implements the variable options interface
 boolean isVariableUI()
          return whether or not the object implements the variableUI interface
 void setDescription(java.lang.String descr)
           
 void setDocumentationURL(java.lang.String doc)
           
 void setLowerBound(java.lang.Object lo)
          This method sets the lower bound of a particular variable.
 void setLowerBoundEnabled(boolean b)
           
 void setName(java.lang.String newName)
           
 void setNamelistGroup(java.lang.String str)
           
 void setType(int newType)
           
 void setUpperBound(java.lang.Object up)
          Sets the upper bound.
 void setUpperBoundEnabled(boolean b)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description

documentationURL

protected java.lang.String documentationURL

type

protected int type

typedVariable

protected boolean typedVariable

variableUI

protected boolean variableUI

variableOptionsUI

protected boolean variableOptionsUI

namelistGroup

protected java.lang.String namelistGroup

UV_TYPE

public static final int UV_TYPE
The following hold public constants for UniVista variable types

UV_LONG

public static final int UV_LONG

UV_COMPLEX

public static final int UV_COMPLEX

UV_BOOLEAN

public static final int UV_BOOLEAN

UV_STRING

public static final int UV_STRING

UV_FLOAT

public static final int UV_FLOAT

UV_ARRAY

public static final int UV_ARRAY

UV_SHORT

public static final int UV_SHORT

typeNames

public static final java.lang.String[] typeNames
Constructor Detail

Variable

public Variable()
Default zero-argument constructor.
Method Detail

clone

public java.lang.Object clone()
clones the variable object
Overrides:
clone in class java.lang.Object

duplicate

public void duplicate(Variable newInfo)
duplicate the information from another Variable into this one

equals

public boolean equals(java.lang.Object obj)
Compare two variable objects
Overrides:
equals in class java.lang.Object

getDescription

public java.lang.String getDescription()
Get and set the short description

getDocumentationURL

public java.lang.String getDocumentationURL()
Get and set the documentation URL

getName

public java.lang.String getName()
Get and set the variable's name

getNamelistGroup

public java.lang.String getNamelistGroup()
The following methods get and set a string intended for use to indicate what namelist group a variable is in, although it can contain anything the programmer wants

getType

public int getType()
Get and set the fundamental type

isTypedVariable

public boolean isTypedVariable()
return whether or not the object implements the typed variable interface

isVariableOptionsUI

public boolean isVariableOptionsUI()
return whether or not the object implements the variable options interface

isVariableUI

public boolean isVariableUI()
return whether or not the object implements the variableUI interface

setDescription

public void setDescription(java.lang.String descr)

setDocumentationURL

public void setDocumentationURL(java.lang.String doc)

setName

public void setName(java.lang.String newName)

setNamelistGroup

public void setNamelistGroup(java.lang.String str)

setType

public void setType(int newType)
Parameters:
newType - should be one of the type constants defined in this class

consistencyCheck

public void consistencyCheck()
                      throws java.lang.Exception
This method tests all the constraints to see that a value meets its conditions.
Specified by:
consistencyCheck in interface ConsistencyCheck
See Also:
ConsistencyCheck

setLowerBound

public void setLowerBound(java.lang.Object lo)
This method sets the lower bound of a particular variable.
Specified by:
setLowerBound in interface ConsistencyCheck
Parameters:
lo - java.lang.Object

isLowerBoundEnabled

public boolean isLowerBoundEnabled()
Specified by:
isLowerBoundEnabled in interface ConsistencyCheck

setLowerBoundEnabled

public void setLowerBoundEnabled(boolean b)
Specified by:
setLowerBoundEnabled in interface ConsistencyCheck

setUpperBound

public void setUpperBound(java.lang.Object up)
Sets the upper bound.
Specified by:
setUpperBound in interface ConsistencyCheck
Parameters:
up - java.lang.Object

isUpperBoundEnabled

public boolean isUpperBoundEnabled()
Specified by:
isUpperBoundEnabled in interface ConsistencyCheck

setUpperBoundEnabled

public void setUpperBoundEnabled(boolean b)
Specified by:
setUpperBoundEnabled in interface ConsistencyCheck