新版仿ok交易所-后端
zyy3
2026-03-03 1256f9068913160f9893b4382cb408835a54349a
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
package com.yami.trading.bean.data.domain;
 
import org.jetbrains.annotations.NotNull;
 
/**
 * An depth entry consisting of price and amount.
 */
public class DepthEntry  implements Comparable<DepthEntry> {
    /**
     * 
     */
    private static final long serialVersionUID = -2177789072570310524L;
    
    private Double price;
    
    private Double amount;
 
    public Double getPrice() {
        return price;
    }
 
    public void setPrice(Double price) {
        this.price = price;
    }
 
    public Double getAmount() {
        return amount;
    }
 
    public void setAmount(Double amount) {
        this.amount = amount;
    }
 
    @Override
    public int compareTo(DepthEntry depthEntry) {
        if (this.price > depthEntry.getPrice()) {
            return 1;
        } else if (this.price < depthEntry.getPrice()) {
            return -1;
        }
        return 0;
    }
}