Indexed properties

An indexed property is represented using an array. If the property represents a list type, then the entire array is used. Otherwise, only a portion of the array is used, and the length of the property is managed internally. This is transparent to you.

Suppose that fieldis an indexed property of type T. The methods generated are:

Java:

   //returns a copy of the array, a new array having length getFieldLength()
   public T[] getField() {...}

   public T getField(int index) {...}

   public int getFieldLength() {...}

   public boolean isSetField() {...}

   //assigns field, making a copy of the given array
   public void setField(T[] value) {...}

   public void setField(int index, T value) {...}

   //assigns field to a new array of the given length
   public void setField(int length) {...}

C#:

   //returns a copy of the array, a new array having length getFieldLength()
   public T[] getField() {...}

   public T getField(int index) {...}

   public int getFieldLength() {...}

   public bool isSetField() {...}

   //assigns field, making a copy of the given array
   public void setField(T[] value) {...}

   public void setField(int index, T value) {...}

   //assigns field to a new array of the given length
   public void setField(int length) {...}