TrueFXTickEvent - tabs to spaces

This commit is contained in:
2018-07-23 01:05:16 -07:00
parent 6a6b8ff1dc
commit 34ab78b9cf

View File

@ -13,85 +13,85 @@ import org.joda.time.DateTime;
*/ */
@JsonPropertyOrder({ "instrument", "time", "bid", "ask" }) @JsonPropertyOrder({ "instrument", "time", "bid", "ask" })
public class TrueFXTickEvent extends TickEvent { public class TrueFXTickEvent extends TickEvent {
@JsonFormat(pattern="yyyyMMdd HH:mm:ss.SSS") @JsonFormat(pattern="yyyyMMdd HH:mm:ss.SSS")
private DateTime time; private DateTime time;
private String instrument; private String instrument;
private BigDecimal bid; private BigDecimal bid;
private BigDecimal ask; private BigDecimal ask;
/** /**
* @return the time * @return the time
*/ */
@Override @Override
public DateTime getTime() { public DateTime getTime() {
return time; return time;
} }
/** /**
* @param time the time to set * @param time the time to set
*/ */
public void setTime(DateTime time) { public void setTime(DateTime time) {
this.time = time; this.time = time;
} }
/** /**
* @return the instrument * @return the instrument
*/ */
@Override @Override
public String getInstrument() { public String getInstrument() {
return instrument; return instrument;
} }
/** /**
* @param instrument the instrument to set * @param instrument the instrument to set
*/ */
public void setInstrument(String instrument) { public void setInstrument(String instrument) {
this.instrument = instrument; this.instrument = instrument;
} }
/** /**
* @return the bid * @return the bid
*/ */
@Override @Override
public BigDecimal getBid() { public BigDecimal getBid() {
return bid; return bid;
} }
/** /**
* @param bid the bid to set * @param bid the bid to set
*/ */
public void setBid(BigDecimal bid) { public void setBid(BigDecimal bid) {
this.bid = bid; this.bid = bid;
} }
/** /**
* @return the ask * @return the ask
*/ */
@Override @Override
public BigDecimal getAsk() { public BigDecimal getAsk() {
return ask; return ask;
} }
/** /**
* @param ask the ask to set * @param ask the ask to set
*/ */
public void setAsk(BigDecimal ask) { public void setAsk(BigDecimal ask) {
this.ask = ask; this.ask = ask;
} }
/** /**
* @return the midprice between bid and ask * @return the midprice between bid and ask
*/ */
@Override @Override
public BigDecimal getMid() { public BigDecimal getMid() {
return getMid(ask, bid); return getMid(ask, bid);
} }
/** /**
* Return a human readable representation of this event. * Return a human readable representation of this event.
*/ */
public String toString() { public String toString() {
return String.format("TrueFXTickEvent[%s, %s, %s]", time, instrument, getMid()); return String.format("TrueFXTickEvent[%s, %s, ask: %s, mid: %s]", time, instrument, getAsk(), getMid());
} }
} }