Mes TD de programmation orientée objet (INSA Toulouse)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Logline.java 527B

123456789101112131415161718192021
  1. import java.util.*;
  2. public class Logline {
  3. protected Date d;
  4. private String msg;
  5. protected Robot r,tier;
  6. public Logline(Date d, String msg, Robot self, Robot tier) {
  7. this.d = d;
  8. this.msg = msg;
  9. this.r = self;
  10. this.tier = tier;
  11. }
  12. @Override public String toString() {
  13. if (tier != null)
  14. return "[" + d.toString() + "](" + r + ", " + tier + ") " + msg + "\n";
  15. else
  16. return "[" + d.toString() + "](" + r + ") " + msg + "\n";
  17. }
  18. }