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
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChecksumInfo
(ChecksumInfo checksumInfo) Adds new checksum info.void
Replaces all checksums with null checksum values that are marked as trusted by Artifactory.boolean
Compares checksums by type only.getChecksumInfo
(ChecksumType type) getMd5()
getSha1()
int
hashCode()
boolean
isEmpty()
boolean
isIdentical
(ChecksumsInfo info) Compares checksums by type and values.void
setChecksums
(Set<ChecksumInfo> checksums) int
size()
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
-