DataKey.java 643 B

123456789101112131415161718192021222324252627282930313233343536
  1. package cn.com.qmth.am.bean;
  2. import java.util.Objects;
  3. public class DataKey {
  4. private int index;
  5. private String key;
  6. public int getIndex() {
  7. return index;
  8. }
  9. public void setIndex(int index) {
  10. this.index = index;
  11. }
  12. public String getKey() {
  13. return key;
  14. }
  15. public void setKey(String key) {
  16. this.key = key;
  17. }
  18. @Override
  19. public int hashCode() {
  20. return Objects.hash(key);
  21. }
  22. @Override
  23. public boolean equals(Object obj) {
  24. if (this == obj)
  25. return true;
  26. if (obj == null)
  27. return false;
  28. if (getClass() != obj.getClass())
  29. return false;
  30. DataKey other = (DataKey) obj;
  31. return Objects.equals(key, other.key);
  32. }
  33. }