Class GainDTO
- java.lang.Object
-
- tech.cassandre.trading.bot.dto.util.GainDTO
-
public final class GainDTO extends Object
Gain.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GainDTO.GainDTOBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GainDTO.GainDTOBuilder
builder()
boolean
equals(Object o)
CurrencyAmountDTO
getAmount()
Gain made (amount).CurrencyAmountDTO
getFees()
Fees.CurrencyAmountDTO
getNetAmount()
Getter netAmount.double
getPercentage()
Gain made (percentage).int
hashCode()
boolean
isInferiorTo(GainDTO other)
Returns true if the current gain is inferior to the gain passed as a parameter.boolean
isSuperiorTo(GainDTO other)
Returns true if the current gain is superior to the gain passed as a parameter.String
toString()
-
-
-
Field Detail
-
ZERO
public static final GainDTO ZERO
Zero constant.
-
-
Method Detail
-
getNetAmount
public CurrencyAmountDTO getNetAmount()
Getter netAmount.- Returns:
- netAmount
-
isInferiorTo
public boolean isInferiorTo(GainDTO other)
Returns true if the current gain is inferior to the gain passed as a parameter.- Parameters:
other
- other gain- Returns:
- true if this gain is inferior to the gain passed as a parameter
-
isSuperiorTo
public boolean isSuperiorTo(GainDTO other)
Returns true if the current gain is superior to the gain passed as a parameter.- Parameters:
other
- other gain- Returns:
- true if this gain is superior to the gain passed as a parameter
-
builder
public static GainDTO.GainDTOBuilder builder()
-
getPercentage
public double getPercentage()
Gain made (percentage).
-
getAmount
public CurrencyAmountDTO getAmount()
Gain made (amount).
-
getFees
public CurrencyAmountDTO getFees()
Fees.
-
-