wxr
2022-11-23 1e7b3abd15d37f6c6bc97ac14922457b9604c275
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.mm.android.deviceaddmodule.mobilecommon.widget.linechart.utils;
 
/**
 * 考虑到性能的原因,采用单例模式
 * --------------------
 * 尽量少的分配内存
 * <p>
 * <p>
 */
 
public class SingleD_XY {
    private double x;
    private double y;
 
    private static SingleD_XY value;
 
    private SingleD_XY() {
 
    }
 
    public synchronized static SingleD_XY getInstance() {
        if (value == null) {
            value = new SingleD_XY();
        }
        return value;
    }
 
    public double getX() {
        return x;
    }
 
    public SingleD_XY setX(double x) {
        this.x = x;
        return this;
    }
 
    public double getY() {
        return y;
    }
 
    public SingleD_XY setY(double y) {
        this.y = y;
        return this;
    }
 
    @Override
    public String toString() {
        return "U_XY  x: " + x + " y:" + y;
    }
}