|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.fr.third.redis.clients.jedis; |
|
|
|
package com.fr.third.redis.clients.jedis; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.third.redis.clients.jedis.util.ByteArrayComparator; |
|
|
|
import com.fr.third.redis.clients.jedis.util.ByteArrayComparator; |
|
|
|
import com.fr.third.redis.clients.jedis.util.SafeEncoder; |
|
|
|
import com.fr.third.redis.clients.jedis.util.SafeEncoder; |
|
|
@ -42,7 +41,7 @@ public class Tuple implements Comparable<Tuple> { |
|
|
|
if (getClass() != obj.getClass()) return false; |
|
|
|
if (getClass() != obj.getClass()) return false; |
|
|
|
Tuple other = (Tuple) obj; |
|
|
|
Tuple other = (Tuple) obj; |
|
|
|
if (!Arrays.equals(element, other.element)) return false; |
|
|
|
if (!Arrays.equals(element, other.element)) return false; |
|
|
|
return Objects.equals(score, other.score); |
|
|
|
return equals(score, other.score); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -77,4 +76,8 @@ public class Tuple implements Comparable<Tuple> { |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return '[' + SafeEncoder.encode(element) + ',' + score + ']'; |
|
|
|
return '[' + SafeEncoder.encode(element) + ',' + score + ']'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean equals(Object a, Object b) { |
|
|
|
|
|
|
|
return (a == b) || (a != null && a.equals(b)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|