vrml.field
Class MFNode

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

public class MFNode
extends MField

Represents a VRML MFNode field in Java.


Constructor Summary
MFNode()
          Default constructor.
MFNode(BaseNode[] nodes)
          Construct an MFNode field.
MFNode(int size, BaseNode[] nodes)
          Construct an MFNode field.
 
Method Summary
 void addValue(BaseNode node)
          Add a new element at the end of the list.
 void addValue(ConstSFNode node)
          Add a new element at the end of the list.
 void addValue(SFNode node)
          Add a new element at the end of the list.
 void clear()
          Removes all fields from the MField.
 java.lang.Object clone()
          Create a shallow copy of the MFNode; the underlying BaseNodes are not copied.
 void delete(int index)
          Deletes a field from the MField.
 BaseNode get1Value(int index)
          Retrieves a specific BaseNode from an MFNode.
 int getSize()
          Number of elements contained in the MField.
 void getValue(BaseNode[] nodes)
          Retrieves the value of an MFNode field.
 void insertValue(int index, BaseNode node)
          Insert a new element at the specified position.
 void insertValue(int index, ConstSFNode node)
          Insert a new element at the specified position.
 void insertValue(int index, SFNode node)
          Insert a new element at the specified position.
 void set1Value(int index, BaseNode node)
          Set a specified element in the field.
 void set1Value(int index, ConstSFNode node)
          Set a specified element in the field.
 void set1Value(int index, SFNode node)
          Set a specified element in the field.
 void setValue(BaseNode[] node)
          Set the value of the field.
 void setValue(ConstMFNode nodes)
          Set the value of the field.
 void setValue(int size, BaseNode[] nodes)
          Set the value of the field.
 void setValue(MFNode nodes)
          Set the value of the field.
 
Methods inherited from class vrml.Field
dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MFNode

public MFNode()
Default constructor.


MFNode

public MFNode(int size,
              BaseNode[] nodes)
Construct an MFNode field.

Parameters:
size - Number of elements passed in.
nodes - Array of BaseNodes.

MFNode

public MFNode(BaseNode[] nodes)
Construct an MFNode field.

Parameters:
nodes - Array of BaseNodes.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Create a shallow copy of the MFNode; the underlying BaseNodes are not copied.

Overrides:
clone in class Field
Returns:
a shallow copy of the MFNode.
Throws:
java.lang.CloneNotSupportedException

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(BaseNode[] nodes)
Retrieves the value of an MFNode field.

Parameters:
nodes - Array of BaseNodes to be returned.

get1Value

public BaseNode get1Value(int index)
Retrieves a specific BaseNode from an MFNode.

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

setValue

public void setValue(BaseNode[] node)
Set the value of the field.

Parameters:
node - New value for field.

setValue

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

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

setValue

public void setValue(MFNode nodes)
Set the value of the field.

Parameters:
nodes - New value for field.

setValue

public void setValue(ConstMFNode nodes)
Set the value of the field.

Parameters:
node - New value for field.

set1Value

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

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

set1Value

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

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

set1Value

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

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

addValue

public void addValue(BaseNode node)
Add a new element at the end of the list.

Parameters:
node - Element to add.

addValue

public void addValue(ConstSFNode node)
Add a new element at the end of the list.

Parameters:
node - Element to add.

addValue

public void addValue(SFNode node)
Add a new element at the end of the list.

Parameters:
node - Element to add.

insertValue

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

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

insertValue

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

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

insertValue

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

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