Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## shout3d.core
Class DoubleArrayField

    java.lang.Object
      |
      +--shout3d.core.Field
            |
            +--shout3d.core.ArrayField
                  |
                  +--shout3d.core.DoubleArrayField

public class DoubleArrayField
extends ArrayField

A Field whose value stores an array of double precision floating point numbers.

Constructor Summary
`DoubleArrayField(Node owner, java.lang.String name, int usage, double[] value)` Constructs a new DoubleArrayField.

Method Summary
`int` | `getLength()` Returns the number of elements in the array of values.
`double[]` | `getValue()` Returns the current value of the field as a reference to the array.
`java.lang.String` | `getValueByString()`
`void` | `set1Value(int index, double newVal)` Sets a single value in the array from the input newVal.
`void` | `setValue(double[] newVal)` Sets the value of the field from the input argument.
`void` | `setValueByString(java.lang.String string)`

Methods inherited from class shout3d.core.Field
`addFieldObserver, addRoute, deleteRoute, getName, getNumRoutes, getOwner, getRoutedField, getTypeName, getUsage, isOfType, isRouted, removeFieldObserver`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DoubleArrayField

    public DoubleArrayField(Node owner,
                            java.lang.String name,
                            int usage,
                            double[] value)

  Constructs a new DoubleArrayField.
  Parameters:
    `owner` - this Field's owner
    `name` - this Field's name
    `usage` - this Field's usage
    `value` - this Field's value

Method Detail

### getLength

    public int getLength()

  Returns the number of elements in the array of values.
  Returns:
    the number of elements
  Overrides:
    getLength in class ArrayField

### set1Value

    public void set1Value(int index,
                          double newVal)
                   throws Shout3DException

  Sets a single value in the array from the input newVal. If the specified index is out of range, throws a Shout3DException. Otherwise, sets the value and notifies all registered FieldObservers.
  Parameters:
    `index` - the index of the element in the array to be set
    `newVal` - the new value for the given element of the field

### setValue

    public void setValue(double[] newVal)

  Sets the value of the field from the input argument. Does not create a copy of the input, but refers to the same array in memory. Following this, notifies all registered FieldObservers.
  Parameters:
    `newVal` - the new value for the field

### getValue

    public double[] getValue()

  Returns the current value of the field as a reference to the array. Returns a reference to the actual value of the field, not a copy. If an application changes the data, it must notify the field by making a subsequent call to setValue.
  Returns:
    the reference to the value

### setValueByString

    public void setValueByString(java.lang.String string)

  Overrides:
    setValueByString in class Field

### getValueByString

    public java.lang.String getValueByString()

  Overrides:
    getValueByString in class Field

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD