package com.bailuntec.domain.pojo;

import java.math.BigDecimal;

/**
 * 坐标
 */
public class DataNode {
    private BigDecimal x;
    private BigDecimal y;

    public DataNode() {
    }

    public DataNode(BigDecimal x, BigDecimal y) {
        this.x = x;
        this.y = y;
    }

    public BigDecimal getX() {
        return x;
    }

    public void setX(BigDecimal x) {
        this.x = x;
    }

    public BigDecimal getY() {
        return y;
    }

    public void setY(BigDecimal y) {
        this.y = y;
    }


    public synchronized BigDecimal  getXY(){
        return this.x .multiply(this.y);
    }

    @Override
    public String toString() {
        return "DataNode{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
