org.vfdtech.implementations.MoneyUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utilities-and-generic-tools Show documentation
Show all versions of utilities-and-generic-tools Show documentation
A utilities service with generic tools implementation. Can be
plugged into your java project
package org.vfdtech.implementations;
import java.math.BigDecimal;
public class MoneyUtils {
public static boolean isBetween(BigDecimal amount, BigDecimal lowerBound, BigDecimal upperBound) {
return amount.compareTo(lowerBound) >= 0 && amount.compareTo(upperBound) <= 0;
}
public static boolean isAbove(BigDecimal amount, BigDecimal bigDecimal) {
return amount.compareTo(bigDecimal) > 0;
}
}