@Test public void hashCodeOfDifferentFreeSpaceInBytes() { StorageInfo storageInfo1 = new StorageInfo(STORAGE_TYPE, FILE_SYSTEM_TYPE, ACCESS_CAPABILITY, MAX_CAPACITY, new UINT64(0), FREE_SPACE_IN_IMAGES, STORAGE_DESCRIPTION, VOLUME_LABEL); StorageInfo storageInfo2 = new StorageInfo(STORAGE_TYPE, FILE_SYSTEM_TYPE, ACCESS_CAPABILITY, MAX_CAPACITY, new UINT64(1), FREE_SPACE_IN_IMAGES, STORAGE_DESCRIPTION, VOLUME_LABEL); assertThat(storageInfo1.hashCode(), not(storageInfo2.hashCode())); }
@Override public int hashCode() { return new HashCodeBuilder() .append(storageType) .append(fileSystemType) .append(accessCapability) .append(maxCapacity) .append(freeSpaceInBytes) .append(freeSpaceInImages) .append(storageDescription) .append(volumeLabel) .toHashCode(); }
StorageInfo { @Override public int hashCode() { return new HashCodeBuilder() .append(storageType) .append(fileSystemType) .append(accessCapability) .append(maxCapacity) .append(freeSpaceInBytes) .append(freeSpaceInImages) .append(storageDescription) .append(volumeLabel) .toHashCode(); } }
StorageInfo { @Override public int hashCode() { return new HashCodeBuilder() .append(storageType) .append(fileSystemType) .append(accessCapability) .append(maxCapacity) .append(freeSpaceInBytes) .append(freeSpaceInImages) .append(storageDescription) .append(volumeLabel) .toHashCode(); } StorageInfo(UINT16 storageType, UINT16 fileSystemType,
                       UINT16 accessCapability, UINT64 maxCapacity, UINT64 freeSpaceInBytes, UINT32 freeSpaceInImages,
                       String storageDescription, String volumeLabel
    ); }
StorageInfo { @Override public int hashCode() { return new HashCodeBuilder() .append(storageType) .append(fileSystemType) .append(accessCapability) .append(maxCapacity) .append(freeSpaceInBytes) .append(freeSpaceInImages) .append(storageDescription) .append(volumeLabel) .toHashCode(); } StorageInfo(UINT16 storageType, UINT16 fileSystemType,
                       UINT16 accessCapability, UINT64 maxCapacity, UINT64 freeSpaceInBytes, UINT32 freeSpaceInImages,
                       String storageDescription, String volumeLabel
    ); static StorageInfo read(InputStream is); static StorageInfo read(PtpInputStream pis); UINT16 getStorageType(); UINT16 getFileSystemType(); UINT16 getAccessCapability(); UINT64 getMaxCapacity(); UINT64 getFreeSpaceInBytes(); UINT32 getFreeSpaceInImages(); String getStorageDescription(); String getVolumeLabel(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
StorageInfo { @Override public int hashCode() { return new HashCodeBuilder() .append(storageType) .append(fileSystemType) .append(accessCapability) .append(maxCapacity) .append(freeSpaceInBytes) .append(freeSpaceInImages) .append(storageDescription) .append(volumeLabel) .toHashCode(); } StorageInfo(UINT16 storageType, UINT16 fileSystemType,
                       UINT16 accessCapability, UINT64 maxCapacity, UINT64 freeSpaceInBytes, UINT32 freeSpaceInImages,
                       String storageDescription, String volumeLabel
    ); static StorageInfo read(InputStream is); static StorageInfo read(PtpInputStream pis); UINT16 getStorageType(); UINT16 getFileSystemType(); UINT16 getAccessCapability(); UINT64 getMaxCapacity(); UINT64 getFreeSpaceInBytes(); UINT32 getFreeSpaceInImages(); String getStorageDescription(); String getVolumeLabel(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }