public void insertValue ( int index , float [ ] newValue ) { if ( newValue . length == 2 ) { try { value . add ( index , new SFVec2f ( newValue [ 0 ] , newValue [ 1 ] ) ) ; } catch ( IndexOutOfBoundsException e ) { Log . e ( TAG , "X3D MFVec2f get1Value(index) out of bounds." + e ) ; } catch ( Exception e ) { Log . e ( TAG , "X3D MFVec2f get1Value(index) exception " + e ) ; } } else { Log . e ( TAG , "X3D MFVec2f insertValue set with array length not equal to 2" ) ; } }
Insert a new value prior to the index location in the existing value array increasing the field length accordingly .