Skip to main content

@PHXClassDecorator(PHXTException_Decorator)

class PHXLong(PHXSimpleType)

The ModelCenter type for longs. This class adds the following features to the PHXSimpleType:
  • value: long
  • valueStr: the source string for the value, useful for error checking when the value is NaN
  • hasUpperValue: boolean
  • upperValue: long
  • hasLowerValue: boolean
  • lowerValue: long
  • enumValues: long[]
  • enumAliases: String[]
If the variable has an upper or lower bound and an attempt is made to store an invalid value, then an exception will be thrown.

def __init__(self, varName)

  • @param varName: the name of the variable already declared in the wrapper to reference
  • @type varName: string
  • @rtype: void

def getValue(self)

retrieves the current value of the variable
  • @rtype: long

def setValue(self, val)

sets the value for the variable
  • @param val: the value
  • @type val: long
  • @rtype: void

def toString(self)

converts the variable to a string
  • @rtype: string

def fromString(self, val)

converts a String representation to the internal value
  • @param val: the value to convert
  • @type val: string
  • @rtype: void

def getEnumAliases(self)

Gets the enumeration aliases list
  • @rtype: string[]

def setEnumAliases(self, aliases)

Sets the enumeration aliases list
  • @param aliases: An array of strings
  • @type aliases: string (as a comma-separated list) or string[]
  • @rtype: void

def getEnumValues(self)

Gets the enumeration values list
  • @rtype: long[]

def setEnumValues(self, values)

Sets the enumeration values list
  • @param values: Either a comma-separated list of values or an array of values
  • @type values: string (as a comma-separated list) or long[]
  • @rtype: void

def getFormat(self)

retrieves the format of the variable
  • @rtype: string

def setFormat(self, format)

sets the format options
  • @param format: the new format
  • @type format: string
  • @rtype: void

def getHasLowerBound(self)

retrieves the hasLowerBound flag
  • @rtype: boolean

def setHasLowerBound(self, value)

sets the hasLowerBound flag
  • @type value: boolean
  • @rtype: void

def getHasUpperBound(self)

retrieves the hasUpperBound flag
  • @rtype: boolean

def setHasUpperBound(self, value)

sets the hasUpperBound flag
  • @type value: boolean
  • @rtype: void

def getLowerBound(self)

retrieves the current lower bound value
  • @rtype: long

def setLowerBound(self, value)

sets the lower bound. The hasLowerBound value is set to true
  • @param value: the lower bound
  • @type value: long
  • @rtype: void

def getUpperBound(self)

retrieves the current upper bound
  • @rtype: long

def setUpperBound(self, value)

sets the upper bound. The hasUpperBound value is set to true
  • @param value: the upper bound
  • @type value: long
  • @rtype: void

def getValueStr(self)

retrieves the current value of the variable (in string form)
  • @rtype: string