Class SoMField

    • Method Detail

      • deleteValues

        public void deleteValues​(int start)
        Calls deleteValues(start, (int)-1).
      • setNum

        public void setNum​(int num)
        Forces this field to have exactly num values, inserting or deleting values as necessary. If field's values are stored in an user data array and if specified number of values is different from this array's length, a new array is allocated and the user's one is no more used.
      • getNum

        public int getNum()
        Returns the number of values currently in the field.
      • get1

        public java.lang.String get1​(int index)
        This is equivalent to the get() method of SoField, but operates on only one value. See the SoField methods for details.
      • deleteValues

        public void deleteValues​(int start,
                                 int num)
        Deletes num values beginning at index start (index start through start + num -1 will be deleted, and any leftover values will be moved down to fill in the gap created). A num of -1 means delete all values from start to the last value in the field; getNum() will return start as the number of values in the field after this operation ( deleteValues(0, -1) empties the field ). However if num is greater than or equal to the number of values in the field, start is ignored and all values are deleted.

        If the field's values are stored in an user data array and if the number of values to delete is not zero, a new array is allocated and the user data array is no longer used.

      • set1

        public boolean set1​(int index,
                            java.lang.String valueString)
        This is equivalent to the set() method of SoField, but operates on only one value. See the SoField methods for details. If field's values are stored in an user data array and if specified index is greater than this array's length, a new array is allocated and the user's one is no more used.
      • insertSpace

        public void insertSpace​(int start,
                                int num)
        Inserts space for num values at index start . Index start through start + num -1 will be moved up to make room. For example, to make room for 7 new values at the beginning of the field call insertSpace(0, 7) . If field's values are stored in an user data array and if the number of values to insert is not zero, a new array is allocated and the user's one is no more used.