com.phoenix_int.aserver.types
Class PHXBooleanArray

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.PHXBooleanArray
All Implemented Interfaces:
IPHXType, IPHXType2, IPHXUnits

public class PHXBooleanArray
extends PHXSimpleArray

Class wraps an array of PHXBoolean 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
PHXBooleanArray()
           
PHXBooleanArray(java.lang.Object data)
           
 
Method Summary
protected  java.lang.Object allocateElement(java.lang.Class elementClass)
          Allocates a single element in a default state.
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.
 boolean getBooleanValue(int index)
          Gets the value of an element as a boolean
 boolean getBooleanValue(int[] index)
          Gets the value of an element as a boolean
 PHXBoolean getValue(int index)
          Gets the value of an element as a PHXBoolean object
 PHXBoolean getValue(int[] index)
          Gets the value of an element as a PHXBoolean object
 void setValue(int[] index, boolean val)
          Sets the value of an element as a boolean
 void setValue(int[] index, PHXBoolean val)
          Sets the value of an element as a PHXBoolean object
 void setValue(int index, boolean val)
          Sets the value of an element as a boolean
 void setValue(int index, PHXBoolean val)
          Sets the value of an element as a PHXBoolean object
 
Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleArray
_getMetaData, _getMetaData, _setMetaData, _setMetaData, 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

PHXBooleanArray

public PHXBooleanArray()

PHXBooleanArray

public PHXBooleanArray(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

allocateElement

protected java.lang.Object allocateElement(java.lang.Class elementClass)
                                    throws java.lang.IllegalAccessException,
                                           java.lang.InstantiationException
Description copied from class: PHXSimpleArray
Allocates a single element in a default state. If the class type in question has a default constructor, there is no need to override this.

Overrides:
allocateElement in class PHXSimpleArray
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException

getValue

public PHXBoolean getValue(int index)
Gets the value of an element as a PHXBoolean object

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

getValue

public PHXBoolean getValue(int[] index)
Gets the value of an element as a PHXBoolean object

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

getBooleanValue

public boolean getBooleanValue(int index)
Gets the value of an element as a boolean

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

getBooleanValue

public boolean getBooleanValue(int[] index)
Gets the value of an element as a boolean

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

setValue

public void setValue(int index,
                     PHXBoolean val)
Sets the value of an element as a PHXBoolean object

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,
                     PHXBoolean val)
Sets the value of an element as a PHXBoolean object

Parameters:
index - nD array index
val - value to set

setValue

public void setValue(int index,
                     boolean val)
Sets the value of an element as a boolean

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,
                     boolean val)
Sets the value of an element as a boolean

Parameters:
index - nD 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