MATLAB BUILDER JA 2 Guida Utente Pagina 210

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 209
4 Using MWArra y Classes
Example Cloning a Structure Array Object
Create an MWStructArray object and then a clone of that object:
int[] sdims = {1, 2};
String[] sfields = {"f1", "f2", "f3"};
MWStructArray S = new MWStructArray(sdims, sfields);
Object C = S.clone();
System.out.println("Clone of structure S is:");
System.out.println(C.toString());
When run, the example displays this output:
Clone of structure S is:
1x2 struct array with fields:
f1
f2
f3
compareTo. MWStructArray inherits this method from the MWArray class.
equals.
MWStructArray inherits this method from the MWArray class.
hashCode.
MWStructArray inherits this method from the MWArray class.
sharedCopy. This method creates and returns a shared copy of the
MWStructArray object. The shared copy points to the underlying original
MATLAB array. Any changes made to the copy are reflected in the original.
The
sharedCopy method of MWStructArray overrides the sharedCopy method
of class
MWArray.
The prototype for the
sharedCopy method is
public Object sharedCopy()
4-134
Vedere la pagina 209
1 2 ... 205 206 207 208 209 210 211 212 213 214 215 ... 291 292

Commenti su questo manuale

Nessun commento