Class BigDecimalUtils
- java.lang.Object
-
- org.spectrumauctions.sats.core.util.BigDecimalUtils
-
public class BigDecimalUtils extends java.lang.Object- Author:
- Michael Weiss
-
-
Constructor Summary
Constructors Constructor Description BigDecimalUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanequalIgnoreScale(java.util.Collection<java.math.BigDecimal> collection1, java.util.Collection<java.math.BigDecimal> collection2)static <T> booleanequalIgnoreScaleOnValues(java.util.Map<T,java.math.BigDecimal> map1, java.util.Map<T,java.math.BigDecimal> map2)Compares if two maps with BigDecimal values are numerically equivalent, i.e, if the keys areObject.equals(Object)and the values numerically equivalent.static inthashCodeIgnoringScale(java.util.Collection<java.math.BigDecimal> collection)static inthashCodeIgnoringScale(java.util.Map<?,java.math.BigDecimal> map)
-
-
-
Method Detail
-
equalIgnoreScale
public static boolean equalIgnoreScale(java.util.Collection<java.math.BigDecimal> collection1, java.util.Collection<java.math.BigDecimal> collection2)
-
equalIgnoreScaleOnValues
public static <T> boolean equalIgnoreScaleOnValues(java.util.Map<T,java.math.BigDecimal> map1, java.util.Map<T,java.math.BigDecimal> map2)Compares if two maps with BigDecimal values are numerically equivalent, i.e, if the keys areObject.equals(Object)and the values numerically equivalent.- Parameters:
map1- the first mapmap2- the second map- Returns:
- true if the values are numerically equivalent
-
hashCodeIgnoringScale
public static int hashCodeIgnoringScale(java.util.Map<?,java.math.BigDecimal> map)
-
hashCodeIgnoringScale
public static int hashCodeIgnoringScale(java.util.Collection<java.math.BigDecimal> collection)
-
-