vrml.field
Class MFString

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

public class MFString
extends MField

Represents a VRML MFString field in Java.


Constructor Summary
MFString()
          Default constructor.
MFString(int size, java.lang.String[] s)
          Construct an MFString field.
MFString(java.lang.String[] s)
          Construct an MFString field.
 
Method Summary
 void addValue(ConstSFString s)
          Add a new element at the end of the list.
 void addValue(SFString s)
          Add a new element at the end of the list.
 void addValue(java.lang.String s)
          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.
 java.lang.String get1Value(int index)
          Retrieves a specific SFString element in an MFString and returns it as a String.
 int getSize()
          Number of elements contained in the MField.
 void getValue(java.lang.String[] s)
          Retrieves the value of an MFString field.
 void insertValue(int index, ConstSFString s)
          Insert a new element at the specified position.
 void insertValue(int index, SFString s)
          Insert a new element at the specified position.
 void insertValue(int index, java.lang.String s)
          Insert a new element at the specified position.
 void set1Value(int index, ConstSFString s)
          Set a specified element in the field.
 void set1Value(int index, SFString s)
          Set a specified element in the field.
 void set1Value(int index, java.lang.String s)
          Set a specified element in the field.
 void setValue(ConstMFString s)
          Set the value of the field.
 void setValue(int size, java.lang.String[] s)
          Set the value of the field.
 void setValue(MFString s)
          Set the value of the field.
 void setValue(java.lang.String[] s)
          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

MFString

public MFString()
Default constructor.


MFString

public MFString(int size,
                java.lang.String[] s)
Construct an MFString field.

Parameters:
size - Number of Strings passed in.
s - Arrays of strings.

MFString

public MFString(java.lang.String[] s)
Construct an MFString field.

Parameters:
s - Arrays of strings.
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(java.lang.String[] s)
Retrieves the value of an MFString field.

Parameters:
s - Array of strings to be returned.

get1Value

public java.lang.String get1Value(int index)
Retrieves a specific SFString element in an MFString and returns it as a String.

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

setValue

public void setValue(java.lang.String[] s)
Set the value of the field.

Parameters:
s - New value for field.

setValue

public void setValue(int size,
                     java.lang.String[] s)
Set the value of the field.

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

setValue

public void setValue(MFString s)
Set the value of the field.

Parameters:
s - New value for field.

setValue

public void setValue(ConstMFString s)
Set the value of the field.

Parameters:
s - New value for field.

set1Value

public void set1Value(int index,
                      java.lang.String s)
Set a specified element in the field.

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

set1Value

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

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

set1Value

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

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

addValue

public void addValue(java.lang.String s)
Add a new element at the end of the list.

Parameters:
s - Element to add.

addValue

public void addValue(ConstSFString s)
Add a new element at the end of the list.

Parameters:
s - Element to add.

addValue

public void addValue(SFString s)
Add a new element at the end of the list.

Parameters:
s - Element to add.

insertValue

public void insertValue(int index,
                        java.lang.String s)
Insert a new element at the specified position.

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

insertValue

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

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

insertValue

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

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