MATLAB BUILDER JA 2 Guía de usuario Pagina 210

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 292
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 209
1 2 ... 205 206 207 208 209 210 211 212 213 214 215 ... 291 292

Comentarios a estos manuales

Sin comentarios