Advertisement
Guest User

Untitled

a guest
May 25th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package lab12b;
  7. import java.util.*;
  8. import java.io.*;
  9. /**
  10. *
  11. * @author Tomasz
  12. */
  13. public class DataSet implements Serializable,Comparable<DataSet>
  14. {
  15. private Long id;
  16. private String info;
  17.  
  18.  
  19. public DataSet(Long id,String info)
  20. {
  21. this.id = id;
  22. this.info = info;
  23. }
  24. @Override
  25. public int compareTo(DataSet obj)
  26. {
  27. return id.compareTo(obj.id);
  28. }
  29. @Override
  30. public String toString()
  31. {
  32. return " " + id + " " + info;
  33. }
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement