MATLAB BUILDER JA 2 Podręcznik Użytkownika Strona 224

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 223
4 Using MWArra y Classes
Exceptions
The clone method throws the following exception:
IndexOutOfBoundsException
The specified index parameter is invalid.
Example Cloning a Cell Array Object
Create an MWCellArray ob ject and then a clone of that object:
int[] cdims = {1, 3};
MWCellArray C = new MWCellArray(cdims);
Object X = C.clone();
System.out.println("Clone of cell array C is:");
System.out.println(X.toString());
When run, the example displays this output:
Clone of cell array C is:
[] [] []
compareTo. MWCellArray inherits this method f rom the MWArray class.
equals.
MWCellArray inherits this method from the MWArray class.
hashCode.
MWCellArray inherits this method from the MWArray class.
sharedCopy. This method creates and returns a shared copy of the
MWCellArray object. The shared copy points to the u nderlying o riginal
MATLAB array. Any changes made to the copy are reflected in the original.
The
sharedCopy method of MWCellArray ov errides the sharedCopy method
of class
MWArray.
The prototype for the
sharedCopy method is
4-148
Przeglądanie stron 223
1 2 ... 219 220 221 222 223 224 225 226 227 228 229 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag