MATLAB BUILDER JA 2 Guía de usuario Pagina 193

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 292
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 192
1 2 ... 188 189 190 191 192 193 194 195 196 197 198 ... 291 292

Comentarios a estos manuales

Sin comentarios