MATLAB BUILDER JA 2 Guida Utente Pagina 193

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 192
Using Class Methods
Example Cloning a Character Array Object
Create a clone of MWCharArray object A:
char[] chArray = {'H', 'e', 'l', 'l', 'o'};
MWCharArray A = new MWCharArray(chArray);
Object C = A.clone();
System.out.println("Clone of matrix A is:");
System.out.println(C.toString());
When run, the example displays this output:
Clone of matrix A is:
Hello
compareTo. MWCharArray inherits this method f rom the MWArray class.
equals.
MWCharArray inherits this method from the MWArray class.
hashCode.
MWCharArray inherits this method from the MWArray class.
sharedCopy. This method creates and returns a shared copy of the
MWCharArray 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 MWCharArray ov errides the sharedCopy method
of class
MWArray.
The prototype for the
sharedCopy method is
public Object sharedCopy();
Input Parameters
None
4-117
Vedere la pagina 192
1 2 ... 188 189 190 191 192 193 194 195 196 197 198 ... 291 292

Commenti su questo manuale

Nessun commento