parent
975c50a32a
commit
5cfd7a1b2a
|
@ -92,6 +92,9 @@ public class CommandInfo {
|
|||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof CommandInfo) {
|
||||
return name.equalsIgnoreCase(((CommandInfo) obj).getName());
|
||||
}
|
||||
|
@ -157,6 +160,11 @@ public class CommandInfo {
|
|||
return sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return name.toLowerCase().hashCode() + method.hashCode() + origin.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 是否为异步命令
|
||||
*/
|
||||
|
|
|
@ -44,6 +44,9 @@ public class TabInfo {
|
|||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof TabInfo) {
|
||||
return method.equals(((TabInfo) obj).getMethod());
|
||||
}
|
||||
|
@ -76,4 +79,9 @@ public class TabInfo {
|
|||
public Method getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return method.hashCode() + origin.hashCode();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue