/Prototipo/PrototipoCommons/src/memoria/commons/structures/Polygon.java

http://prototipomemoria.googlecode.com/ · Java · 48 lines · 29 code · 11 blank · 8 comment · 0 complexity · 6d3bff14a7c596c9b221a97b0de2f1df MD5 · raw file

  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package memoria.commons.structures;
  6. import java.util.ArrayList;
  7. import java.util.Arrays;
  8. import java.util.List;
  9. /**
  10. *
  11. * @author diego
  12. */
  13. public class Polygon extends Line {
  14. private Point center;
  15. public Point getCenter() {
  16. return center;
  17. }
  18. @Override
  19. public String getTypeRepresentation()
  20. {
  21. return "Polygon";
  22. }
  23. public void setCenter(Point center) {
  24. this.center = center;
  25. }
  26. public Polygon(Point center) {
  27. super();
  28. this.center = center;
  29. }
  30. public Polygon(){
  31. super();
  32. }
  33. @Override
  34. public List<Point> getCenterPoints() {
  35. return Arrays.asList(this.getCenter());
  36. }
  37. }