PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 6package memoria.commons.structures;
 7
 8import java.util.ArrayList;
 9import java.util.Arrays;
10import java.util.List;
11
12/**
13 *
14 * @author diego
15 */
16public class Polygon extends Line {
17
18    private Point center;
19
20    public Point getCenter() {
21        return center;
22    }
23
24    @Override
25    public String getTypeRepresentation()
26    {
27       return "Polygon";
28    }
29
30    public void setCenter(Point center) {
31        this.center = center;
32    }
33
34    public Polygon(Point center) {
35        super();
36        this.center = center;
37    }
38
39    public Polygon(){
40        super();
41    }
42
43    @Override
44    public List<Point> getCenterPoints() {
45        return Arrays.asList(this.getCenter());
46    }
47
48}