getAmount() returns an integer, meaning you can check if the value equals the amount you want or is higher than the amount you want with basic operators:
if(inventory.getItem(item).getAmount() >= 3) { //if inventory contains 3 or more of item, returns true
//code to execute when true
}