@Test public void notEqualsWithManufacturer() { DeviceInfo deviceInfo1 = new DeviceInfo( STANDARD_VERSION, VENDOR_EXTENSION_ID, VENDOR_EXTENSION_VERSION, VENDOR_EXTENSION_DESC, FUNCTIONAL_MODE, OPERATIONS_SUPPORTED, EVENTS_SUPPORTED, DEVICE_PROPERTIES_SUPPORTED, CAPTURE_FORMATS, IMAGE_FORMATS, "foo", MODEL, DEVICE_VERSION, SERIAL_NUMBER); DeviceInfo deviceInfo2 = new DeviceInfo( STANDARD_VERSION, VENDOR_EXTENSION_ID, VENDOR_EXTENSION_VERSION, VENDOR_EXTENSION_DESC, FUNCTIONAL_MODE, OPERATIONS_SUPPORTED, EVENTS_SUPPORTED, DEVICE_PROPERTIES_SUPPORTED, CAPTURE_FORMATS, IMAGE_FORMATS, "bar", MODEL, DEVICE_VERSION, SERIAL_NUMBER); assertFalse(deviceInfo1.equals(deviceInfo2)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeviceInfo rhs = (DeviceInfo) o; return new EqualsBuilder() .append(standardVersion, rhs.standardVersion) .append(vendorExtensionID, rhs.vendorExtensionID) .append(vendorExtensionVersion, rhs.vendorExtensionVersion) .append(vendorExtensionDesc, rhs.vendorExtensionDesc) .append(functionalMode, rhs.functionalMode) .append(operationsSupported, rhs.operationsSupported) .append(eventsSupported, rhs.eventsSupported) .append(devicePropertiesSupported, rhs.devicePropertiesSupported) .append(captureFormats, rhs.captureFormats) .append(imageFormats, rhs.imageFormats) .append(manufacturer, rhs.manufacturer) .append(model, rhs.model) .append(deviceVersion, rhs.deviceVersion) .append(serialNumber, rhs.serialNumber) .isEquals(); }
DeviceInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeviceInfo rhs = (DeviceInfo) o; return new EqualsBuilder() .append(standardVersion, rhs.standardVersion) .append(vendorExtensionID, rhs.vendorExtensionID) .append(vendorExtensionVersion, rhs.vendorExtensionVersion) .append(vendorExtensionDesc, rhs.vendorExtensionDesc) .append(functionalMode, rhs.functionalMode) .append(operationsSupported, rhs.operationsSupported) .append(eventsSupported, rhs.eventsSupported) .append(devicePropertiesSupported, rhs.devicePropertiesSupported) .append(captureFormats, rhs.captureFormats) .append(imageFormats, rhs.imageFormats) .append(manufacturer, rhs.manufacturer) .append(model, rhs.model) .append(deviceVersion, rhs.deviceVersion) .append(serialNumber, rhs.serialNumber) .isEquals(); } }
DeviceInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeviceInfo rhs = (DeviceInfo) o; return new EqualsBuilder() .append(standardVersion, rhs.standardVersion) .append(vendorExtensionID, rhs.vendorExtensionID) .append(vendorExtensionVersion, rhs.vendorExtensionVersion) .append(vendorExtensionDesc, rhs.vendorExtensionDesc) .append(functionalMode, rhs.functionalMode) .append(operationsSupported, rhs.operationsSupported) .append(eventsSupported, rhs.eventsSupported) .append(devicePropertiesSupported, rhs.devicePropertiesSupported) .append(captureFormats, rhs.captureFormats) .append(imageFormats, rhs.imageFormats) .append(manufacturer, rhs.manufacturer) .append(model, rhs.model) .append(deviceVersion, rhs.deviceVersion) .append(serialNumber, rhs.serialNumber) .isEquals(); } DeviceInfo(
            UINT16 standardVersion,
            UINT32 vendorExtensionID, UINT16 vendorExtensionVersion, String vendorExtensionDesc,
            UINT16 functionalMode,
            List<UINT16> operationsSupported, List<UINT16> eventsSupported, List<UINT16> devicePropertiesSupported,
            List<UINT16> captureFormats, List<UINT16> imageFormats,
            String manufacturer, String model, String deviceVersion, String serialNumber); }
DeviceInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeviceInfo rhs = (DeviceInfo) o; return new EqualsBuilder() .append(standardVersion, rhs.standardVersion) .append(vendorExtensionID, rhs.vendorExtensionID) .append(vendorExtensionVersion, rhs.vendorExtensionVersion) .append(vendorExtensionDesc, rhs.vendorExtensionDesc) .append(functionalMode, rhs.functionalMode) .append(operationsSupported, rhs.operationsSupported) .append(eventsSupported, rhs.eventsSupported) .append(devicePropertiesSupported, rhs.devicePropertiesSupported) .append(captureFormats, rhs.captureFormats) .append(imageFormats, rhs.imageFormats) .append(manufacturer, rhs.manufacturer) .append(model, rhs.model) .append(deviceVersion, rhs.deviceVersion) .append(serialNumber, rhs.serialNumber) .isEquals(); } DeviceInfo(
            UINT16 standardVersion,
            UINT32 vendorExtensionID, UINT16 vendorExtensionVersion, String vendorExtensionDesc,
            UINT16 functionalMode,
            List<UINT16> operationsSupported, List<UINT16> eventsSupported, List<UINT16> devicePropertiesSupported,
            List<UINT16> captureFormats, List<UINT16> imageFormats,
            String manufacturer, String model, String deviceVersion, String serialNumber); static DeviceInfo read(InputStream is); static DeviceInfo read(PtpInputStream pis); UINT16 getStandardVersion(); UINT32 getVendorExtensionID(); UINT16 getVendorExtensionVersion(); String getVendorExtensionDesc(); UINT16 getFunctionalMode(); List<UINT16> getOperationsSupported(); List<UINT16> getEventsSupported(); List<UINT16> getDevicePropertiesSupported(); List<UINT16> getCaptureFormats(); List<UINT16> getImageFormats(); String getManufacturer(); String getModel(); String getDeviceVersion(); String getSerialNumber(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); }
DeviceInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeviceInfo rhs = (DeviceInfo) o; return new EqualsBuilder() .append(standardVersion, rhs.standardVersion) .append(vendorExtensionID, rhs.vendorExtensionID) .append(vendorExtensionVersion, rhs.vendorExtensionVersion) .append(vendorExtensionDesc, rhs.vendorExtensionDesc) .append(functionalMode, rhs.functionalMode) .append(operationsSupported, rhs.operationsSupported) .append(eventsSupported, rhs.eventsSupported) .append(devicePropertiesSupported, rhs.devicePropertiesSupported) .append(captureFormats, rhs.captureFormats) .append(imageFormats, rhs.imageFormats) .append(manufacturer, rhs.manufacturer) .append(model, rhs.model) .append(deviceVersion, rhs.deviceVersion) .append(serialNumber, rhs.serialNumber) .isEquals(); } DeviceInfo(
            UINT16 standardVersion,
            UINT32 vendorExtensionID, UINT16 vendorExtensionVersion, String vendorExtensionDesc,
            UINT16 functionalMode,
            List<UINT16> operationsSupported, List<UINT16> eventsSupported, List<UINT16> devicePropertiesSupported,
            List<UINT16> captureFormats, List<UINT16> imageFormats,
            String manufacturer, String model, String deviceVersion, String serialNumber); static DeviceInfo read(InputStream is); static DeviceInfo read(PtpInputStream pis); UINT16 getStandardVersion(); UINT32 getVendorExtensionID(); UINT16 getVendorExtensionVersion(); String getVendorExtensionDesc(); UINT16 getFunctionalMode(); List<UINT16> getOperationsSupported(); List<UINT16> getEventsSupported(); List<UINT16> getDevicePropertiesSupported(); List<UINT16> getCaptureFormats(); List<UINT16> getImageFormats(); String getManufacturer(); String getModel(); String getDeviceVersion(); String getSerialNumber(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }