-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathNxt$AskOrder.java
More file actions
42 lines (40 loc) · 1007 Bytes
/
Nxt$AskOrder.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$AskOrder
implements Comparable<AskOrder>
{
final long id;
final long height;
final Nxt.Account account;
final long asset;
volatile int quantity;
final long price;
Nxt$AskOrder(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(AskOrder paramAskOrder)
{
if (this.price < paramAskOrder.price) {
return -1;
}
if (this.price > paramAskOrder.price) {
return 1;
}
if (this.height < paramAskOrder.height) {
return -1;
}
if (this.height > paramAskOrder.height) {
return 1;
}
if (this.id < paramAskOrder.id) {
return -1;
}
if (this.id > paramAskOrder.id) {
return 1;
}
return 0;
}