-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathNxt$BidOrder.java
More file actions
42 lines (40 loc) · 1007 Bytes
/
Nxt$BidOrder.java
File metadata and controls
42 lines (40 loc) · 1007 Bytes
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
class Nxt$BidOrder
implements Comparable<BidOrder>
{
final long id;
final long height;
final Nxt.Account account;
final long asset;
volatile int quantity;
final long price;
Nxt$BidOrder(long paramLong1, Nxt.Account paramAccount, long paramLong2, int paramInt, long paramLong3)
{
this.id = paramLong1;
this.height = Nxt.Block.getLastBlock().height;
this.account = paramAccount;
this.asset = paramLong2;
this.quantity = paramInt;
this.price = paramLong3;
}
public int compareTo(BidOrder paramBidOrder)
{
if (this.price > paramBidOrder.price) {
return -1;
}
if (this.price < paramBidOrder.price) {
return 1;
}
if (this.height < paramBidOrder.height) {
return -1;
}
if (this.height > paramBidOrder.height) {
return 1;
}
if (this.id < paramBidOrder.id) {
return -1;
}
if (this.id > paramBidOrder.id) {
return 1;
}
return 0;
}