@Test public void equalsWithSameInstance() { ObjectInfo objectInfo = new ObjectInfo(STORAGE_ID, OBJECT_FORMAT, PROTECTION_STATUS, OBJECT_COMPRESSED_SIZE, THUMB_FORMAT, THUMB_COMPRESSED_SIZE, THUMB_PIX_WIDTH, THUMB_PIX_HEIGHT, IMAGE_PIX_WIDTH, IMAGE_PIX_HEIGHT, IMAGE_BIT_DEPTH, PARENT_OBJECT, ASSOCIATION_TYPE, ASSOCIATION_DESC, SEQUENCE_NUMBER, FILE_NAME, CAPTURE_DATE, MODIFICATION_DATE, KEYWORDS); assertTrue(objectInfo.equals(objectInfo)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ObjectInfo rhs = (ObjectInfo) o; return new EqualsBuilder() .append(storageID, rhs.storageID) .append(objectFormat, rhs.objectFormat) .append(protectionStatus, rhs.protectionStatus) .append(objectCompressedSize, rhs.objectCompressedSize) .append(thumbFormat, rhs.thumbFormat) .append(thumbCompressedSize, rhs.thumbCompressedSize) .append(thumbPixWidth, rhs.thumbPixWidth) .append(thumbPixHeight, rhs.thumbPixHeight) .append(imagePixWidth, rhs.imagePixWidth) .append(imagePixHeight, rhs.imagePixHeight) .append(imageBitDepth, rhs.imageBitDepth) .append(parentObject, rhs.parentObject) .append(associationType, rhs.associationType) .append(associationDesc, rhs.associationDesc) .append(sequenceNumber, rhs.sequenceNumber) .append(fileName, rhs.fileName) .append(captureDate, rhs.captureDate) .append(modificationDate, rhs.modificationDate) .append(keywords, rhs.keywords) .isEquals(); }
ObjectInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ObjectInfo rhs = (ObjectInfo) o; return new EqualsBuilder() .append(storageID, rhs.storageID) .append(objectFormat, rhs.objectFormat) .append(protectionStatus, rhs.protectionStatus) .append(objectCompressedSize, rhs.objectCompressedSize) .append(thumbFormat, rhs.thumbFormat) .append(thumbCompressedSize, rhs.thumbCompressedSize) .append(thumbPixWidth, rhs.thumbPixWidth) .append(thumbPixHeight, rhs.thumbPixHeight) .append(imagePixWidth, rhs.imagePixWidth) .append(imagePixHeight, rhs.imagePixHeight) .append(imageBitDepth, rhs.imageBitDepth) .append(parentObject, rhs.parentObject) .append(associationType, rhs.associationType) .append(associationDesc, rhs.associationDesc) .append(sequenceNumber, rhs.sequenceNumber) .append(fileName, rhs.fileName) .append(captureDate, rhs.captureDate) .append(modificationDate, rhs.modificationDate) .append(keywords, rhs.keywords) .isEquals(); } }
ObjectInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ObjectInfo rhs = (ObjectInfo) o; return new EqualsBuilder() .append(storageID, rhs.storageID) .append(objectFormat, rhs.objectFormat) .append(protectionStatus, rhs.protectionStatus) .append(objectCompressedSize, rhs.objectCompressedSize) .append(thumbFormat, rhs.thumbFormat) .append(thumbCompressedSize, rhs.thumbCompressedSize) .append(thumbPixWidth, rhs.thumbPixWidth) .append(thumbPixHeight, rhs.thumbPixHeight) .append(imagePixWidth, rhs.imagePixWidth) .append(imagePixHeight, rhs.imagePixHeight) .append(imageBitDepth, rhs.imageBitDepth) .append(parentObject, rhs.parentObject) .append(associationType, rhs.associationType) .append(associationDesc, rhs.associationDesc) .append(sequenceNumber, rhs.sequenceNumber) .append(fileName, rhs.fileName) .append(captureDate, rhs.captureDate) .append(modificationDate, rhs.modificationDate) .append(keywords, rhs.keywords) .isEquals(); } ObjectInfo(UINT32 storageID, UINT16 objectFormat, ProtectionStatus protectionStatus, UINT32 objectCompressedSize,
                      UINT16 thumbFormat, UINT32 thumbCompressedSize, UINT32 thumbPixWidth, UINT32 thumbPixHeight,
                      UINT32 imagePixWidth, UINT32 imagePixHeight, UINT32 imageBitDepth,
                      UINT32 parentObject, UINT16 associationType, UINT32 associationDesc, UINT32 sequenceNumber,
                      String fileName, String captureDate, String modificationDate, String keywords
    ); }
ObjectInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ObjectInfo rhs = (ObjectInfo) o; return new EqualsBuilder() .append(storageID, rhs.storageID) .append(objectFormat, rhs.objectFormat) .append(protectionStatus, rhs.protectionStatus) .append(objectCompressedSize, rhs.objectCompressedSize) .append(thumbFormat, rhs.thumbFormat) .append(thumbCompressedSize, rhs.thumbCompressedSize) .append(thumbPixWidth, rhs.thumbPixWidth) .append(thumbPixHeight, rhs.thumbPixHeight) .append(imagePixWidth, rhs.imagePixWidth) .append(imagePixHeight, rhs.imagePixHeight) .append(imageBitDepth, rhs.imageBitDepth) .append(parentObject, rhs.parentObject) .append(associationType, rhs.associationType) .append(associationDesc, rhs.associationDesc) .append(sequenceNumber, rhs.sequenceNumber) .append(fileName, rhs.fileName) .append(captureDate, rhs.captureDate) .append(modificationDate, rhs.modificationDate) .append(keywords, rhs.keywords) .isEquals(); } ObjectInfo(UINT32 storageID, UINT16 objectFormat, ProtectionStatus protectionStatus, UINT32 objectCompressedSize,
                      UINT16 thumbFormat, UINT32 thumbCompressedSize, UINT32 thumbPixWidth, UINT32 thumbPixHeight,
                      UINT32 imagePixWidth, UINT32 imagePixHeight, UINT32 imageBitDepth,
                      UINT32 parentObject, UINT16 associationType, UINT32 associationDesc, UINT32 sequenceNumber,
                      String fileName, String captureDate, String modificationDate, String keywords
    ); static ObjectInfo read(InputStream is); static ObjectInfo read(PtpInputStream pis); UINT32 getStorageID(); UINT16 getObjectFormat(); ProtectionStatus getProtectionStatus(); UINT32 getObjectCompressedSize(); UINT16 getThumbFormat(); UINT32 getThumbCompressedSize(); UINT32 getThumbPixWidth(); UINT32 getThumbPixHeight(); UINT32 getImagePixWidth(); UINT32 getImagePixHeight(); UINT32 getImageBitDepth(); UINT32 getParentObject(); UINT16 getAssociationType(); UINT32 getAssociationDesc(); UINT32 getSequenceNumber(); String getFileName(); String getCaptureDate(); String getModificationDate(); String getKeywords(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ObjectInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ObjectInfo rhs = (ObjectInfo) o; return new EqualsBuilder() .append(storageID, rhs.storageID) .append(objectFormat, rhs.objectFormat) .append(protectionStatus, rhs.protectionStatus) .append(objectCompressedSize, rhs.objectCompressedSize) .append(thumbFormat, rhs.thumbFormat) .append(thumbCompressedSize, rhs.thumbCompressedSize) .append(thumbPixWidth, rhs.thumbPixWidth) .append(thumbPixHeight, rhs.thumbPixHeight) .append(imagePixWidth, rhs.imagePixWidth) .append(imagePixHeight, rhs.imagePixHeight) .append(imageBitDepth, rhs.imageBitDepth) .append(parentObject, rhs.parentObject) .append(associationType, rhs.associationType) .append(associationDesc, rhs.associationDesc) .append(sequenceNumber, rhs.sequenceNumber) .append(fileName, rhs.fileName) .append(captureDate, rhs.captureDate) .append(modificationDate, rhs.modificationDate) .append(keywords, rhs.keywords) .isEquals(); } ObjectInfo(UINT32 storageID, UINT16 objectFormat, ProtectionStatus protectionStatus, UINT32 objectCompressedSize,
                      UINT16 thumbFormat, UINT32 thumbCompressedSize, UINT32 thumbPixWidth, UINT32 thumbPixHeight,
                      UINT32 imagePixWidth, UINT32 imagePixHeight, UINT32 imageBitDepth,
                      UINT32 parentObject, UINT16 associationType, UINT32 associationDesc, UINT32 sequenceNumber,
                      String fileName, String captureDate, String modificationDate, String keywords
    ); static ObjectInfo read(InputStream is); static ObjectInfo read(PtpInputStream pis); UINT32 getStorageID(); UINT16 getObjectFormat(); ProtectionStatus getProtectionStatus(); UINT32 getObjectCompressedSize(); UINT16 getThumbFormat(); UINT32 getThumbCompressedSize(); UINT32 getThumbPixWidth(); UINT32 getThumbPixHeight(); UINT32 getImagePixWidth(); UINT32 getImagePixHeight(); UINT32 getImageBitDepth(); UINT32 getParentObject(); UINT16 getAssociationType(); UINT32 getAssociationDesc(); UINT32 getSequenceNumber(); String getFileName(); String getCaptureDate(); String getModificationDate(); String getKeywords(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }