We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public int compareTo(Keyword o) { return this.tfidfvalue - o.tfidfvalue > 0.0D ? -1 : 1; } 这段代码在jdk7以上会违反Comparator三大原则:自反性,传递性,对称性,所以强烈建议将此处代码进行修改 参考如下,以下代码做个测试,可行: public int compareTo(Keyword o) { return Double.compare(o.tfidfvalue, this.tfidfvalue); }
The text was updated successfully, but these errors were encountered:
都停更这么久了 。
Sorry, something went wrong.
确实有这个问题。
No branches or pull requests
public int compareTo(Keyword o) {
return this.tfidfvalue - o.tfidfvalue > 0.0D ? -1 : 1;
}
这段代码在jdk7以上会违反Comparator三大原则:自反性,传递性,对称性,所以强烈建议将此处代码进行修改
参考如下,以下代码做个测试,可行:
public int compareTo(Keyword o) {
return Double.compare(o.tfidfvalue, this.tfidfvalue);
}
The text was updated successfully, but these errors were encountered: