You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.0 KiB
46 lines
1.0 KiB
package com.sothr.imagetools.hash.dto
|
|
|
|
import grizzled.slf4j.Logging
|
|
|
|
class ImageHashDTO(var ahash: Long, var dhash: Long, var phash: Long, var fileHash: String) extends Serializable with Logging {
|
|
|
|
def getAhash: Long = ahash
|
|
|
|
def setAhash(hash: Long) = {
|
|
ahash = hash
|
|
}
|
|
|
|
def getDhash: Long = dhash
|
|
|
|
def setDhash(hash: Long) = {
|
|
dhash = hash
|
|
}
|
|
|
|
def getPhash: Long = phash
|
|
|
|
def setPhash(hash: Long) = {
|
|
phash = hash
|
|
}
|
|
|
|
def getFileHash: String = fileHash
|
|
|
|
def setFileHash(hash: String) = {
|
|
fileHash = hash
|
|
}
|
|
|
|
def cloneHashes: ImageHashDTO = {
|
|
new ImageHashDTO(ahash, dhash, phash, fileHash)
|
|
}
|
|
|
|
override def hashCode(): Int = {
|
|
var result = 365
|
|
result = 41 * result + (this.ahash ^ (this.ahash >>> 32)).toInt
|
|
result = 37 * result + (this.dhash ^ (this.dhash >>> 32)).toInt
|
|
result = 2 * result + (this.phash ^ (this.phash >>> 32)).toInt
|
|
result
|
|
}
|
|
|
|
override def toString: String = {
|
|
s"fileHash: $fileHash ahash: $ahash dhash: $dhash phash: $phash"
|
|
}
|
|
}
|