@Override public int hashCode() { return new HashCodeBuilder() .append(getDevice()) .append(getMedia()) .append(getPaper()) .append(getToner()) .append(getInk()) .append(getLamp()) .append(getRetractBins().orElse(null)) .append(getMediaOnStacker()) .append(getExtra()) .toHashCode(); }
@Override public String toString() { return new ToStringBuilder(this) .append("device", getDevice()) .append("media", getMedia()) .append("paper", getPaper()) .append("toner", getToner()) .append("ink", getInk()) .append("lamp", getLamp()) .append("retractBins", getRetractBins()) .append("mediaOnStacker", getMediaOnStacker()) .append("extra", getExtra()) .toString(); } }
@Override public boolean equals(Object obj) { if (obj instanceof PtrStatus3) { PtrStatus3 ptrStatus3 = (PtrStatus3) obj; return new EqualsBuilder() .append(getDevice(), ptrStatus3.getDevice()) .append(getMedia(), ptrStatus3.getMedia()) .append(getPaper(), ptrStatus3.getPaper()) .append(getToner(), ptrStatus3.getToner()) .append(getInk(), ptrStatus3.getInk()) .append(getLamp(), ptrStatus3.getLamp()) .append(getRetractBins().orElse(null), ptrStatus3.getRetractBins().orElse(null)) .append(getMediaOnStacker(), ptrStatus3.getMediaOnStacker()) .append(getExtra(), ptrStatus3.getExtra()) .isEquals(); } return false; }
protected void set(PtrStatus3 copy) { device.set(copy.getDevice()); media.set(copy.getMedia()); paper.set(copy.getPaper()); toner.set(copy.getToner()); ink.set(copy.getInk()); lamp.set(copy.getLamp()); Optional<RetractBin3[]> retractBins = copy.getRetractBins(); if (retractBins.isPresent()) { this.retractBins.pointTo(new RetractBins3(retractBins.get())); } mediaOnStacker.set(copy.getMediaOnStacker()); extra.set(copy.getExtra()); }
@Override protected void execute() { table = new Table(getClass(), "Component", "Value"); try { final PtrStatus3 status = new PTRStatusCallable(service).call(); addRow("Device", status.getDevice()); addRow("Media", status.getMedia()); addPaperSupplyStates(status.getPaper()); addRow("Toner", status.getToner()); addRow("Ink", status.getInk()); addRow("Lamp", status.getLamp()); addRow("RetractBins", status.getRetractBins()); addRow("MediaOnStacker", status.getMediaOnStacker()); addRow("Extra", status.getExtra()); if (status instanceof PtrStatus310) { PtrStatus310 status310 = (PtrStatus310) status; addRow("GuidLights", status310.getGuidLights()); addRow("DevicePosition", status310.getDevicePosition()); addRow("PowerSaveRecoveryTime", status310.getPowerSaveRecoveryTime()); } if (status instanceof PtrStatus320) { PtrStatus320 status320 = (PtrStatus320) status; addRow("PaperTypes", status320.getPaperTypes()); addRow("AntiFraudModule", status320.getAntiFraudModule()); } getContent().setUIElement(table); } catch (final XfsException e) { showException(e); } }