com.ibm.apl2
Class Apl2object

java.lang.Object
  extended bycom.ibm.apl2.Apl2object

public class Apl2object
extends java.lang.Object

Java object class which manages APL2 workspace data objects.

The final fields provide constant values for datatypes returned by the type method.


Field Summary
static int CDWRTA
          Workspace object type code: Integer progression vector.
static int CDWRTB
          Workspace object type code: Boolean.
static int CDWRTC
          Workspace object type code: Single byte character.
static int CDWRTD
          Workspace object type code: Four byte character.
static int CDWRTG
          Workspace object type code: General array.
static int CDWRTI
          Workspace object type code: Integer.
static int CDWRTJ
          Workspace object type code: Complex.
static int CDWRTR
          Workspace object type code: Real.
 
Constructor Summary
Apl2object(Apl2interp Apl2interp, Apl2cdr Value)
          Construct an object from an Apl2cdr object
Apl2object(Apl2interp Apl2interp, boolean Value)
          Construct an object from a boolean value.
Apl2object(Apl2interp Apl2interp, byte Value)
          Construct an object from a byte value.
Apl2object(Apl2interp Apl2interp, char Value)
          Construct an object from a char value.
Apl2object(Apl2interp Apl2interp, double Value)
          Construct an object from a double value.
Apl2object(Apl2interp Apl2interp, float Value)
          Construct an object from a float value.
Apl2object(Apl2interp Apl2interp, int Value)
          Construct an object from an int value.
Apl2object(Apl2interp Apl2interp, long Value)
          Construct an object from a long value.
Apl2object(Apl2interp Apl2interp, java.lang.Object Value)
          Construct an object from an arbitrary Object.
Apl2object(Apl2interp Apl2interp, java.lang.Object Value, boolean Global)
          Construct an object containing a global reference to an arbitrary Object.
Apl2object(Apl2interp Apl2interp, short Value)
          Construct an object from a short value.
Apl2object(Apl2interp Apl2interp, java.lang.String Value)
          Construct an object from a String value.
 
Method Summary
 boolean[] booleanarrayValue()
          Returns the value of the specified object as an array of booleans.
 boolean booleanValue()
          Returns the value of the specified object as a boolean.
 byte[] bytearrayValue()
          Returns the value of the specified object as an array of bytes.
 byte byteValue()
          Returns the value of the specified object as a byte.
 Apl2cdr cdrValue()
          Returns the value of the specified object in its Canonical Data Representation.
 char[] chararrayValue()
          Returns the value of the specified object as an array of chars.
 char charValue()
          Returns the value of the specified object as a char.
 double[] doublearrayValue()
          Returns the value of the specified object as an array of doubles.
 double doubleValue()
          Returns the value of the specified object as a double.
 float[] floatarrayValue()
          Returns the value of the specified object as an array of floats.
 float floatValue()
          Returns the value of the specified object as a float.
 void Free()
          Free the object
 Apl2interp GetApl2interp()
          Get the Apl2interp object used to construct the Apl2object
 int[] intarrayValue()
          Returns the value of the specified object as an array of ints.
 int intValue()
          Returns the value of the specified object as an int.
 long[] longarrayValue()
          Returns the value of the specified object as an array of longs.
 long longValue()
          Returns the value of the specified object as a long.
 int rank()
          Returns the specified object's rank.
 int[] shape()
          Returns the specified object's shape.
 short[] shortarrayValue()
          Returns the value of the specified object as an array of shorts.
 short shortValue()
          Returns the value of the specified object as a short.
 java.lang.String[] stringarrayValue()
          Returns the value of the specified object as an array of Strings.
 java.lang.String stringValue()
          Returns the value of the specified object as a String.
 int type()
          Returns the data type of the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CDWRTB

public static final int CDWRTB
Workspace object type code: Boolean.

See Also:
Constant Field Values

CDWRTI

public static final int CDWRTI
Workspace object type code: Integer.

See Also:
Constant Field Values

CDWRTR

public static final int CDWRTR
Workspace object type code: Real.

See Also:
Constant Field Values

CDWRTJ

public static final int CDWRTJ
Workspace object type code: Complex.

See Also:
Constant Field Values

CDWRTC

public static final int CDWRTC
Workspace object type code: Single byte character.

See Also:
Constant Field Values

CDWRTD

public static final int CDWRTD
Workspace object type code: Four byte character.

See Also:
Constant Field Values

CDWRTA

public static final int CDWRTA
Workspace object type code: Integer progression vector.

See Also:
Constant Field Values

CDWRTG

public static final int CDWRTG
Workspace object type code: General array.

See Also:
Constant Field Values
Constructor Detail

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  boolean Value)
           throws Apl2exception
Construct an object from a boolean value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - Boolean value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  byte Value)
           throws Apl2exception
Construct an object from a byte value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - byte value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  char Value)
           throws Apl2exception
Construct an object from a char value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - char value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  double Value)
           throws Apl2exception
Construct an object from a double value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - double value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  float Value)
           throws Apl2exception
Construct an object from a float value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - float value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  int Value)
           throws Apl2exception
Construct an object from an int value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - int value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  long Value)
           throws Apl2exception
Construct an object from a long value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - long value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  short Value)
           throws Apl2exception
Construct an object from a short value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - short value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  java.lang.String Value)
           throws Apl2exception
Construct an object from a String value.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - String value from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  java.lang.Object Value)
           throws Apl2exception
Construct an object from an arbitrary Object.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - Object from which to create object

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  java.lang.Object Value,
                  boolean Global)
           throws Apl2exception
Construct an object containing a global reference to an arbitrary Object.

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - Object from which to create object
Global - Boolean must be true

Apl2object

public Apl2object(Apl2interp Apl2interp,
                  Apl2cdr Value)
           throws Apl2exception
Construct an object from an Apl2cdr object

Parameters:
Apl2interp - APL2 interpreter in which to create object
Value - Apl2cdr Object from which to create workspace object
Method Detail

GetApl2interp

public Apl2interp GetApl2interp()
Get the Apl2interp object used to construct the Apl2object


Free

public void Free()
          throws Apl2exception
Free the object

Throws:
Apl2exception

type

public int type()
         throws Apl2exception
Returns the data type of the specified object.

Returns:
int See public constants
Throws:
Apl2exception

rank

public int rank()
         throws Apl2exception
Returns the specified object's rank.

Returns:
int Rank
Throws:
Apl2exception

shape

public int[] shape()
            throws Apl2exception
Returns the specified object's shape.

Returns:
int[] Shape
Throws:
Apl2exception

booleanValue

public boolean booleanValue()
                     throws Apl2exception
Returns the value of the specified object as a boolean.

Throws:
Apl2exception

byteValue

public byte byteValue()
               throws Apl2exception
Returns the value of the specified object as a byte.

Throws:
Apl2exception

charValue

public char charValue()
               throws Apl2exception
Returns the value of the specified object as a char.

Throws:
Apl2exception

doubleValue

public double doubleValue()
                   throws Apl2exception
Returns the value of the specified object as a double.

Throws:
Apl2exception

floatValue

public float floatValue()
                 throws Apl2exception
Returns the value of the specified object as a float.

Throws:
Apl2exception

intValue

public int intValue()
             throws Apl2exception
Returns the value of the specified object as an int.

Throws:
Apl2exception

longValue

public long longValue()
               throws Apl2exception
Returns the value of the specified object as a long.

Throws:
Apl2exception

shortValue

public short shortValue()
                 throws Apl2exception
Returns the value of the specified object as a short.

Throws:
Apl2exception

stringValue

public java.lang.String stringValue()
                             throws Apl2exception
Returns the value of the specified object as a String.

Throws:
Apl2exception

booleanarrayValue

public boolean[] booleanarrayValue()
                            throws Apl2exception
Returns the value of the specified object as an array of booleans.

Throws:
Apl2exception

bytearrayValue

public byte[] bytearrayValue()
                      throws Apl2exception
Returns the value of the specified object as an array of bytes.

Throws:
Apl2exception

chararrayValue

public char[] chararrayValue()
                      throws Apl2exception
Returns the value of the specified object as an array of chars.

Throws:
Apl2exception

doublearrayValue

public double[] doublearrayValue()
                          throws Apl2exception
Returns the value of the specified object as an array of doubles.

Throws:
Apl2exception

floatarrayValue

public float[] floatarrayValue()
                        throws Apl2exception
Returns the value of the specified object as an array of floats.

Throws:
Apl2exception

intarrayValue

public int[] intarrayValue()
                    throws Apl2exception
Returns the value of the specified object as an array of ints.

Throws:
Apl2exception

longarrayValue

public long[] longarrayValue()
                      throws Apl2exception
Returns the value of the specified object as an array of longs.

Throws:
Apl2exception

shortarrayValue

public short[] shortarrayValue()
                        throws Apl2exception
Returns the value of the specified object as an array of shorts.

Throws:
Apl2exception

stringarrayValue

public java.lang.String[] stringarrayValue()
                                    throws Apl2exception
Returns the value of the specified object as an array of Strings.

Throws:
Apl2exception

cdrValue

public Apl2cdr cdrValue()
                 throws Apl2exception
Returns the value of the specified object in its Canonical Data Representation.

Throws:
Apl2exception