package sklep;

import java.math.BigDecimal;

import org.assertj.core.api.Condition;

public class ConditionTowarNiedrogi extends Condition<Towar> {
	private final static BigDecimal DOMYSLNY_LIMIT = new BigDecimal("100.00");
	
	private final static ConditionTowarNiedrogi singleton = new ConditionTowarNiedrogi();
	
	@Override
	public boolean matches(Towar towar) {
		return towar.getCenaBrutto().compareTo(DOMYSLNY_LIMIT) < 0;
	}
	
	public static ConditionTowarNiedrogi niedrogi() {
		return singleton;
	}

}
