Package com.yahoo.binaryprefix
Class BinaryScaledAmount
- java.lang.Object
-
- com.yahoo.binaryprefix.BinaryScaledAmount
-
public final class BinaryScaledAmount extends Object
An amount scaled by a binary prefix.Examples: 2 kilo, 2 mega, ...
- Author:
- Tony Vaagenes
-
-
Field Summary
Fields Modifier and Type Field Description double
amount
BinaryPrefix
binaryPrefix
-
Constructor Summary
Constructors Constructor Description BinaryScaledAmount()
BinaryScaledAmount(double amount, BinaryPrefix binaryPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
as(BinaryPrefix newBinaryPrefix)
BinaryScaledAmount
divide(double d)
boolean
equals(BinaryScaledAmount candidate)
boolean
equals(Object candidate)
int
hashCode()
BinaryScaledAmount
multiply(double d)
-
-
-
Field Detail
-
amount
public final double amount
-
binaryPrefix
public final BinaryPrefix binaryPrefix
-
-
Constructor Detail
-
BinaryScaledAmount
public BinaryScaledAmount(double amount, BinaryPrefix binaryPrefix)
-
BinaryScaledAmount
public BinaryScaledAmount()
-
-
Method Detail
-
as
public long as(BinaryPrefix newBinaryPrefix)
-
equals
public boolean equals(BinaryScaledAmount candidate)
-
multiply
public BinaryScaledAmount multiply(double d)
-
divide
public BinaryScaledAmount divide(double d)
-
-