package com.yongk.pattern.chainOfResponsibility;

public class LimitSupport extends Support {

	private int limit;

	public LimitSupport(String name, int limit) {
		super(name);
		this.limit = limit;
	}

	public LimitSupport(String name) {
		super(name);
	}

	@Override
	public boolean resolve(Trouble t) {
		if (t.getNumber() < limit)
			return true;
		return false;
	}
	
}
