Package org.artifactory.checksum
Class ChecksumsInfo
java.lang.Object
org.artifactory.checksum.ChecksumsInfo
- All Implemented Interfaces:
Serializable
A container class to manage a collection of checksums, with isIdentical and other equals, hashCode goodies.
- Author:
- Yoav Landman, Fred Simon
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChecksumInfo(ChecksumInfo checksumInfo) Adds new checksum info.voidReplaces all checksums with null checksum values that are marked as trusted by Artifactory.booleanCompares checksums by type only.getChecksumInfo(ChecksumType type) getMd5()getSha1()inthashCode()booleanisEmpty()booleanisIdentical(ChecksumsInfo info) Compares checksums by type and values.voidsetChecksums(Set<ChecksumInfo> checksums) intsize()toString()
-
Constructor Details
-
ChecksumsInfo
public ChecksumsInfo() -
ChecksumsInfo
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
size
public int size() -
getMd5
- Returns:
- The actual MD5 checksum or null if not found
-
getSha1
- Returns:
- The actual SHA1 checksum or null if not found
-
getSha256
- Returns:
- The actual SHA256 checksum or null if not found
-
setChecksums
-
getChecksums
-
getChecksumInfo
-
addChecksumInfo
Adds new checksum info. If checksum of the same type already exists it will be overridden.- Parameters:
checksumInfo- The checksum info to add
-
createTrustedChecksums
public void createTrustedChecksums()Replaces all checksums with null checksum values that are marked as trusted by Artifactory. For internal use only. -
isIdentical
Compares checksums by type and values. -
equals
Compares checksums by type only. -
hashCode
public int hashCode() -
toString
-