Label.java 929 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 common;
  7. /**
  8. *
  9. * @author EUGENIO CARVALHO
  10. */
  11. public class Label {
  12. protected Long Position,
  13. GlobalPosition;
  14. protected String label;
  15. public Long GetPosition() {
  16. return Position;
  17. }
  18. public Label SetPosition(Long Position) {
  19. this.Position = Position;
  20. return this;
  21. }
  22. public Long GetGlobalPosition() {
  23. return GlobalPosition;
  24. }
  25. public Label SetGlobalPosition(Long GlobalPosition) {
  26. this.GlobalPosition = GlobalPosition;
  27. return this;
  28. }
  29. public String GetLabel() {
  30. return label.replaceAll("\\+_i\\d+", "+" + Position);
  31. }
  32. public Label SetLabel(String label) {
  33. this.label = label;
  34. return this;
  35. }
  36. }