MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / deepClone

Method deepClone

ij/src/main/java/ij/gui/Plot.java:4928–4936  ·  view source on GitHub ↗

A deep clone, which duplicates arrays etc. Note that colors & font are not cloned; it is assumed that these wil not be modified but replaced, so the clone remains unaffected

()

Source from the content-addressed store, hash-verified

4926 * Note that colors & font are not cloned; it is assumed that these wil not be modified but replaced,
4927 * so the clone remains unaffected */
4928 public PlotObject deepClone() {
4929 PlotObject po2 = clone();
4930 if (xValues != null) po2.xValues = xValues.clone();
4931 if (yValues != null) po2.yValues = yValues.clone();
4932 if (xEValues != null) po2.xEValues = xEValues.clone();
4933 if (yEValues != null) po2.yEValues = yEValues.clone();
4934 if (shapeData != null) po2.shapeData = cloneArrayList(shapeData);
4935 return po2;
4936 }
4937
4938 /** A clone of an array list one level deeper than a shallow clone.
4939 * The clone() method of the objects in the list must be accessible */

Callers

nothing calls this directly

Calls 3

cloneMethod · 0.95
cloneArrayListMethod · 0.95
cloneMethod · 0.65

Tested by

no test coverage detected