Class Money
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.financial.Money
- All Implemented Interfaces:
MockUnit<java.lang.String>,MockUnitString
public class Money extends MockUnitBase implements MockUnitString
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_LOWERstatic doubleDEFAULT_UPPER -
Constructor Summary
-
Method Summary
Modifier and Type Method Description MockUnitStringbound(double bound)Moneylocale(java.util.Locale locale)static Moneymoney()Returns aMoneyobject that can be used to generate arbitrary "money" information.MockUnitStringrange(double lowerBound, double upperBound)java.util.function.Supplier<java.lang.String>supplier()This is the sole abstract method of the interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnit
array, array, collection, collection, collection, collection, collection, collection, consume, consume, get, get, list, list, list, list, list, list, map, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapToDouble, mapToInt, mapToLocalDate, mapToLong, mapToString, mapToString, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, serialize, set, set, set, set, set, set, stream, val, val, valStr, valStrMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnitString
accumulate, append, array, base64, escapeCsv, escapeEcmaScript, escapeHtml, escapeXml, format, md2, md5, noSpecialChars, prepend, replace, replace, replaceAll, replaceFirst, sha1, sha256, sha384, sha512, split, split, sub, sub, urlEncode, urlEncode
-
Field Details
-
DEFAULT_LOWER
public static final double DEFAULT_LOWER- See Also:
- Constant Field Values
-
DEFAULT_UPPER
public static final double DEFAULT_UPPER- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
money
Returns a
Moneyobject that can be used to generate arbitrary "money" information.The generated text represents sums of money generated using
NumberFormat.getCurrencyInstance().format(...).Note:By default it returns a random sum of money
- Returns:
- A re-usable
Moneyobject. TheMoneyclass implementsMockUnitString.
-
locale
-
range
-
bound
-
supplier
public java.util.function.Supplier<java.lang.String> supplier()Description copied from interface:MockUnitThis is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented.
-