com.phoenix_int.aserver.types
Class PHXStringArray

java.lang.Object
  extended by com.phoenix_int.aserver.types.PHXSimpleType
      extended by com.phoenix_int.aserver.types.PHXSimpleArray
          extended by com.phoenix_int.aserver.types.PHXStringArray
All Implemented Interfaces:
IPHXType, IPHXType2, IPHXUnits

public class PHXStringArray
extends PHXSimpleArray

Class wraps an array of PHXString variables for the ScriptWrapper utility.

See Also:
PHXSimpleArray

Field Summary
 
Fields inherited from class com.phoenix_int.aserver.types.PHXSimpleArray
_data, _lockDims, _lockResize
 
Constructor Summary
PHXStringArray()
           
PHXStringArray(java.lang.Object data)
           
 
Method Summary
protected  void _getMetaData(PHXSimpleType v2)
          Worker which takes the meta data from an instance of PHXSimpleType and sets it into our meta data.
protected  void _setMetaData(PHXSimpleType v2)
          Sets a simple type's meta data based on the meta data in this object.
protected  boolean dataTypeOK(java.lang.Class c)
          Must override this function and return true if the specified class is acceptable as an array element component type.
protected  java.lang.Object elementFromString(java.lang.String val)
          Sub-classes must provide an implementation of this function which converts a string form of a single element to Object form.
 java.lang.String[] getEnumAliases()
          An interface function for the enumeration array
 java.lang.String getEnumAliasesStr()
          An interface function for the enumeration array
 java.lang.String[] getEnumValues()
          An interface function for the enumeration array
 java.lang.String getEnumValuesStr()
          Interface function to pass out the enumeration array as a comma separated string
 java.lang.String getStringValue(int index)
          Gets a particular element as a String
 java.lang.String getStringValue(int[] index)
          Gets a particular element as a String
 PHXString getValue(int index)
          Gets a particular element as a PHXString
 PHXString getValue(int[] index)
          Gets a particular element as a PHXString
 void setEnumAliases(java.lang.String values)
          takes a comma seperated string of values and fills the enumeration aliases list with values.
 void setEnumAliases(java.lang.String[] values)
          Sets the enumeration aliases list
 void setEnumValues(java.lang.String values)
          takes a comma seperated string of values and fills the enumeration List with values.
 void setEnumValues(java.lang.String[] values)
          sets enum values
 void setValue(int[] index, PHXString val)
          Sets a particular element as a PHXString
 void setValue(int[] index, java.lang.String val)
          Sets a particular element as a String
 void setValue(int index, PHXString val)
          Sets a particular element as a PHXString
 void setValue(int index, java.lang.String val)
          Sets a particular element as a String
 
Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleArray
_getMetaData, _setMetaData, allocateElement, checkRectangular, fromString, fromString, fromString, fromString, fromString2, generateFor, generateFor, getArray, getArrayElement, getArrayElement, getComponentType, getComponentType, getDimensions, getDimensions, getFirst, getLength, getLength, getLockResize, getnDIndex, getNumDimensions, getNumDimensions, getSelf, incrementIndex, lockDimensions, newIndex, parseIndex, resize, setArray, setArrayElement, setArrayElement, setDimensions, setFirst, setLength, setLength, setLockResize, toString, toString, toString, toString, toString2, toString2, toString2, validElement
 
Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleType
addPropertyChangeListener, getDescription, getEnumTokens, getHasChanged, getUnits, removePropertyChangeListener, setDescription, setHasChanged, setUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PHXStringArray

public PHXStringArray()

PHXStringArray

public PHXStringArray(java.lang.Object data)
Method Detail

dataTypeOK

protected boolean dataTypeOK(java.lang.Class c)
Description copied from class: PHXSimpleArray
Must override this function and return true if the specified class is acceptable as an array element component type.

Specified by:
dataTypeOK in class PHXSimpleArray

setEnumValues

public void setEnumValues(java.lang.String values)
takes a comma seperated string of values and fills the enumeration List with values.

Parameters:
values - A comma seperrated string of enumeration values

setEnumValues

public void setEnumValues(java.lang.String[] values)
sets enum values

Parameters:
value: - list of enum values

getEnumValues

public java.lang.String[] getEnumValues()
An interface function for the enumeration array

Returns:
an array of the possible values of the list

getEnumValuesStr

public java.lang.String getEnumValuesStr()
Interface function to pass out the enumeration array as a comma separated string

Returns:
comma separated string of the possible values of the list

setEnumAliases

public void setEnumAliases(java.lang.String values)
takes a comma seperated string of values and fills the enumeration aliases list with values.

Parameters:
values - A comma seperated string of enumeration aliases

setEnumAliases

public void setEnumAliases(java.lang.String[] values)
Sets the enumeration aliases list

Parameters:
values - An array of strings

getEnumAliases

public java.lang.String[] getEnumAliases()
An interface function for the enumeration array

Returns:
an array of the possible values of the list

getEnumAliasesStr

public java.lang.String getEnumAliasesStr()
An interface function for the enumeration array

Returns:
an comma separated string of the possible values of the list

_setMetaData

protected void _setMetaData(PHXSimpleType v2)
Description copied from class: PHXSimpleArray
Sets a simple type's meta data based on the meta data in this object. Override this to set additional information in sub-classes. Be sure to call super._setMetaData(PHXSimpleType)

Overrides:
_setMetaData in class PHXSimpleArray

_getMetaData

protected void _getMetaData(PHXSimpleType v2)
Description copied from class: PHXSimpleArray
Worker which takes the meta data from an instance of PHXSimpleType and sets it into our meta data. Override this in order to add more custom meta data in sub-classes. Be sure to cal super._getMetaData(PHXSimpleType), though!

Overrides:
_getMetaData in class PHXSimpleArray

getValue

public PHXString getValue(int index)
Gets a particular element as a PHXString

Parameters:
index - 1D array index
Returns:
referenced array value
Throws:
java.lang.IllegalArgumentException - thrown if called on non-1D array

getValue

public PHXString getValue(int[] index)
Gets a particular element as a PHXString

Parameters:
index - 1D array index
Returns:
referenced array value

getStringValue

public java.lang.String getStringValue(int index)
Gets a particular element as a String

Parameters:
index - nD array index
Returns:
referenced array value
Throws:
java.lang.IllegalArgumentException - thrown if called on non-1D array

getStringValue

public java.lang.String getStringValue(int[] index)
Gets a particular element as a String

Parameters:
index - nD array index
Returns:
referenced array value

setValue

public void setValue(int index,
                     PHXString val)
Sets a particular element as a PHXString

Parameters:
index - 1D array index
val - value to set
Throws:
java.lang.IllegalArgumentException - thrown if called on non-1D array

setValue

public void setValue(int[] index,
                     PHXString val)
Sets a particular element as a PHXString

Parameters:
index - 1D array index
val - value to set

setValue

public void setValue(int index,
                     java.lang.String val)
Sets a particular element as a String

Parameters:
index - 1D array index
val - value to set
Throws:
java.lang.IllegalArgumentException - thrown if called on non-1D array

setValue

public void setValue(int[] index,
                     java.lang.String val)
Sets a particular element as a String

Parameters:
index - 1D array index
val - value to set

elementFromString

protected java.lang.Object elementFromString(java.lang.String val)
Description copied from class: PHXSimpleArray
Sub-classes must provide an implementation of this function which converts a string form of a single element to Object form. This is only used when the element type does not implement IPHXType or IPHXType2. For primitives, return the wrapper objects.

Specified by:
elementFromString in class PHXSimpleArray