I have a domain class with unitPrice set as BigDecimal data type. Now I am trying to create a method to compare price but it seems like I can\'t have comparison operators in Big
You can use method named compareTo, x.compareTo(y). It will return 0 if x and y are equal, 1 if x is greater than y and -1 if x is smaller than y
compareTo
x.compareTo(y)