vrml.field
Class MFDouble

java.lang.Object
  extended by vrml.Field
      extended by vrml.MField
          extended by vrml.field.MFDouble
All Implemented Interfaces:
java.lang.Cloneable

public class MFDouble
extends MField

Represents a VRML MFDouble field in Java.


Constructor Summary
MFDouble()
          Construct a new MFDouble field in OpenVRML using the default params
MFDouble(double[] values)
          Construct an MFDouble field in OpenVRML using the given params.
MFDouble(int size, double[] values)
          Construct an MFDouble field in OpenVRML using the given params.
 
Method Summary
 void addValue(ConstSFDouble d)
          Add a new element at the end of the list.
 void addValue(double d)
          Add a new element at the end of the list.
 void addValue(SFDouble d)
          Add a new element at the end of the list.
 void clear()
          Removes all fields from the MField.
 void delete(int index)
          Deletes a field from the MField.
 double get1Value(int index)
          Retrieves a specific SFDouble element in an MFDouble and returns it as a double.
 int getSize()
          Number of elements contained in the MField.
 void getValue(double[] values)
          Retrieves the value of an MFDouble field.
 void insertValue(int index, ConstSFDouble d)
          Insert a new element at the specified position.
 void insertValue(int index, double d)
          Insert a new element at the specified position.
 void insertValue(int index, SFDouble d)
          Insert a new element at the specified position.
 void set1Value(int index, ConstSFDouble d)
          Set a specified element in the field.
 void set1Value(int index, double d)
          Set a specified element in the field.
 void set1Value(int index, SFDouble d)
          Set a specified element in the field.
 void setValue(ConstMFDouble value)
          Set the value of the field.
 void setValue(double[] values)
          Set the value of the field.
 void setValue(int size, double[] values)
          Set the value of the field.
 void setValue(MFDouble value)
          Set the value of the field.
 
Methods inherited from class vrml.Field
clone, dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MFDouble

public MFDouble()
Construct a new MFDouble field in OpenVRML using the default params


MFDouble

public MFDouble(int size,
                double[] values)
Construct an MFDouble field in OpenVRML using the given params.

Parameters:
size - Number of SFDouble elements passed in.
values - Array of SFDouble values.

MFDouble

public MFDouble(double[] values)
Construct an MFDouble field in OpenVRML using the given params.

Parameters:
values - An array of SFDouble values.
Method Detail

getSize

public int getSize()
Description copied from class: MField
Number of elements contained in the MField.

Specified by:
getSize in class MField
Returns:
Number of elements.

clear

public void clear()
Description copied from class: MField
Removes all fields from the MField.

Specified by:
clear in class MField

delete

public void delete(int index)
Description copied from class: MField
Deletes a field from the MField.

Specified by:
delete in class MField
Parameters:
index - Index of field to delete.

getValue

public void getValue(double[] values)
Retrieves the value of an MFDouble field.

Parameters:
values - Array of double values to be returned.

get1Value

public double get1Value(int index)
Retrieves a specific SFDouble element in an MFDouble and returns it as a double.

Parameters:
index - Position of desired SFDouble
Returns:
Value of SFDouble at index.

setValue

public void setValue(double[] values)
Set the value of the field.

Parameters:
values - New value for field.

setValue

public void setValue(int size,
                     double[] values)
Set the value of the field.

Parameters:
size - Size of new value for field.
values - New value for field.

setValue

public void setValue(MFDouble value)
Set the value of the field.

Parameters:
value - New value for field.

setValue

public void setValue(ConstMFDouble value)
Set the value of the field.

Parameters:
value - New value for field.

set1Value

public void set1Value(int index,
                      double d)
Set a specified element in the field.

Parameters:
index - Position of element to update.
d - New value for element.

set1Value

public void set1Value(int index,
                      ConstSFDouble d)
Set a specified element in the field.

Parameters:
index - Position of element to update.
d - New value for element.

set1Value

public void set1Value(int index,
                      SFDouble d)
Set a specified element in the field.

Parameters:
index - Position of element to update.
d - New value for element.

addValue

public void addValue(double d)
Add a new element at the end of the list.

Parameters:
d - Element to add.

addValue

public void addValue(ConstSFDouble d)
Add a new element at the end of the list.

Parameters:
d - Element to add.

addValue

public void addValue(SFDouble d)
Add a new element at the end of the list.

Parameters:
d - Element to add.

insertValue

public void insertValue(int index,
                        double d)
Insert a new element at the specified position.

Parameters:
index - Position to insert new element at.
d - Value to insert.

insertValue

public void insertValue(int index,
                        ConstSFDouble d)
Insert a new element at the specified position.

Parameters:
index - Position to insert new element at.
d - SFDouble to insert.

insertValue

public void insertValue(int index,
                        SFDouble d)
Insert a new element at the specified position.

Parameters:
index - Position to insert new element at.
d - SFDouble to insert.