Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. package src.Utils;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class TypeID implements Serializable {
  6. private char TYPE;
  7. private int PROBE_ID;
  8.  
  9. public TypeID(){
  10. this.TYPE = 'A';
  11. this.PROBE_ID = 0;
  12. }
  13. public TypeID(char TYPE, int PROBE_ID) {
  14. this.TYPE = TYPE;
  15. this.PROBE_ID = PROBE_ID;
  16. }
  17.  
  18. public char getTYPE() {
  19. return TYPE;
  20. }
  21.  
  22. public void setTYPE(char TYPE) {
  23. this.TYPE = TYPE;
  24. }
  25.  
  26. public int getPROBE_ID() {
  27. return PROBE_ID;
  28. }
  29.  
  30. public void setPROBE_ID(int PROBE_ID) {
  31. this.PROBE_ID = PROBE_ID;
  32. }
  33.  
  34. @Override
  35. public boolean equals(Object o){
  36. if(o == null)
  37. return false;
  38. if(o == this)
  39. return true;
  40. if(!(o instanceof TypeID))
  41. return false;
  42.  
  43. TypeID aux = (TypeID) o;
  44. return aux.getTYPE() == this.TYPE && aux.getPROBE_ID() == this.PROBE_ID;
  45.  
  46. }
  47. @Override
  48. public String toString(){
  49. return this.PROBE_ID+ " - "+this.TYPE;
  50. }
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement