public override BarcodeData Clone()
- (instancetype)copy
@Override public BarcodeData clone()
public:
BarcodeData^ Clone(); override
def Clone(self):
The DatamatrixBarcodeData cast as an object.
This method overrides the base class BarcodeData.Clone to clone the extra members of this class.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Barcode;
using Leadtools.ImageProcessing;
public void BarcodeData_CloneExample()
{
// Create a BarcodeData object
BarcodeData data1 = new BarcodeData(BarcodeSymbology.UPCA, "01234567890");
data1.Bounds = new LeadRect(0, 0, 400, 200);
// Clone it
BarcodeData data2 = data1.Clone() as BarcodeData;
// Make sure they have the same value but not same reference
Debug.Assert(data1 != data2);
Debug.Assert(data1.Symbology == data2.Symbology);
Debug.Assert(data1.Value == data2.Value);
Debug.Assert(data1.Bounds == data2.Bounds);
Console.WriteLine("Cloned OK");
}
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import org.junit.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
import leadtools.barcode.*;
import leadtools.codecs.*;
public void barcodeDataCloneExample() {
// Create a BarcodeData object
BarcodeData data1 = new BarcodeData(BarcodeSymbology.UPC_A, "01234567890");
data1.setBounds(new LeadRect(0, 0, 400, 200));
// Clone it
BarcodeData data2 = (BarcodeData)data1.clone();
// Make sure they have the same value but not same reference
assertTrue(data1 != data2);
assertTrue("Unsuccessfully cloned", data1.getSymbology() == data2.getSymbology());
System.out.println("Cloned OK");
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document