package com.bgycc.smartcanteen.event; public class QRCodeEvent { public byte[] data; public String string; public String payCodeType; public QRCodeEvent(byte[] data, String string, String payCodeType) { this.data = data; this.string = string; this.payCodeType = payCodeType; } public boolean isEmpty() { return this.string == null || this.string.isEmpty(); } public boolean equal(QRCodeEvent event) { if (event == null) return false; if (isEmpty() != event.isEmpty()) return false; if (isEmpty()) return true; return this.string.equals(event.string); } }