Am having a custom array list UserDeactivationThreshold from that i want to get the minimum thresholdvalue
for example. Please find the output from toString() method.
UserDeactivationThreshold [id=26, businessTypeName=parts, roleName=System Admin, thresholdValue=30]
UserDeactivationThreshold [id=27, businessTypeName=parts, roleName=Dealer, thresholdValue=25]
UserDeactivationThreshold [id=40, businessTypeName=BCP Attachments, roleName=System Admin, thresholdValue=20]
from this list, am having two different businessTypeName (parts and BCP) for the same roleName (System Admin). so for i have to select the least thresholdValue of two.
Expected output : i have to select thresholdValue=20 for System Admin instead of thresholdValue=30
Am using Java 6 version.