forked from api-bricks/api-bricks-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLevel.java
More file actions
31 lines (25 loc) · 994 Bytes
/
Copy pathLevel.java
File metadata and controls
31 lines (25 loc) · 994 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
/**
* Stores all the state for an orderbook level, as described in <a href= "https://docs.coinapi.io/#order-book">https://docs.coinapi.io/#order-book</a>.
* <p>
* This class is multithread safe: it is <a href="http://www.ibm.com/developerworks/java/library/j-jtp02183.html">immutable</a>.
* In particular, it is always <a href="http://www.ibm.com/developerworks/java/library/j-jtp0618.html">properly constructed</a>,
* all of its fields are final,
* and none of their state can be changed after construction.
* See p. 53 of <a href="http://www.javaconcurrencyinpractice.com">Java Concurrency In Practice</a> for more discussion.
*/
public class Level {
/** Price of bid/ask */
private final double price;
/** Volume resting on bid/ask level in base amount */
private final double size;
public Level(double price, double size) {
this.price = price;
this.size = size;
}
public double get_price() {
return price;
}
public double get_size() {
return size;
}
}