Package vrml.field
Class MFInt32
java.lang.Object
vrml.Field
vrml.MField
vrml.field.MFInt32
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intHow much should we increment the array by when there is an add or insert request.protected int[]The rot valuesFields inherited from class vrml.MField
numElementsFields inherited from class vrml.Field
valueChanged -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValue(int val) Add this value to the end of the list.voidaddValue(ConstSFInt32 val) Add this value to the end of the list.voidAdd this value to the end of the list.voidclear()Clear the field of all elementsclone()Make a clone of this object.voiddelete(int index) Remove the element at the given position and shift any other items down.intget1Value(int index) Get the value of the field at the given indexvoidgetValue(int[] values) Copy the values from this field into the user arrayvoidinsertValue(int index, int val) Insert a value at the given index into the arrayvoidinsertValue(int index, ConstSFInt32 val) Insert a value at the given index into the arrayvoidinsertValue(int index, SFInt32 val) Insert a value at the given index into the arrayvoidset1Value(int index, int val) Replace one value in the array with this value.voidset1Value(int index, ConstSFInt32 val) Replace one value in the array with this value.voidReplace one value in the array with this value.voidsetValue(int[] values) Replace the value of this array with the given valuesvoidsetValue(int size, int[] values) Replace the value of this array with a subsection of the given values.voidsetValue(ConstMFInt32 value) Set the value of this field based on the value of the given field.voidSet the value of this field based on the value of the given field.toString()Create a string representation of the field values.
-
Field Details
-
ARRAY_INC
protected static final int ARRAY_INCHow much should we increment the array by when there is an add or insert request. This value is array items, not elements.- See Also:
-
data
protected int[] dataThe rot values
-
-
Constructor Details
-
MFInt32
public MFInt32()Create a new empty array with no content. -
MFInt32
public MFInt32(int[] values) Create a new int array based on all the values.- Parameters:
values- The values to copy
-
MFInt32
public MFInt32(int size, int[] values) Create a new int array based on a selection of values- Parameters:
size- The number of elements to copyvalues- The values to copy
-
-
Method Details
-
getValue
public void getValue(int[] values) Copy the values from this field into the user array- Parameters:
values- The target array to copy into
-
get1Value
public int get1Value(int index) Get the value of the field at the given index- Parameters:
index- The position to get the value from- Returns:
- The value at that index
-
setValue
public void setValue(int[] values) Replace the value of this array with the given values- Parameters:
values- The new values to use
-
setValue
public void setValue(int size, int[] values) Replace the value of this array with a subsection of the given values.- Parameters:
size- The number of elements to copyvalues- The new values to use
-
setValue
Set the value of this field based on the value of the given field.- Parameters:
value- The field to copy data from
-
setValue
Set the value of this field based on the value of the given field.- Parameters:
value- The field to copy data from
-
set1Value
public void set1Value(int index, int val) Replace one value in the array with this value.- Parameters:
index- The index to replaceval- The new value to use
-
set1Value
Replace one value in the array with this value.- Parameters:
index- The index to replaceval- The new value to use
-
set1Value
Replace one value in the array with this value.- Parameters:
index- The index to replaceval- The new value to use
-
addValue
public void addValue(int val) Add this value to the end of the list.- Parameters:
val- The new value to add
-
addValue
Add this value to the end of the list.- Parameters:
val- The new value to add
-
addValue
Add this value to the end of the list.- Parameters:
val- The new value to add
-
insertValue
public void insertValue(int index, int val) Insert a value at the given index into the array- Parameters:
index- The index to replaceval- The new value to insert
-
insertValue
Insert a value at the given index into the array- Parameters:
index- The index to replaceval- The new value to insert
-
insertValue
Insert a value at the given index into the array- Parameters:
index- The index to replaceval- The new value to insert
-
clear
-
delete
-
toString
-
clone
-