package com.persagy.adm.diagram.core.model.logic;

import com.persagy.adm.diagram.core.build.CalcContext;

/**
 * and条件
 * @author zhaoyk
 */
public class AndFilter extends LogicFilter {

	public AndFilter(){
		this.type = TYPE_AND;
	}

	@Override
	protected boolean judge(Object data, CalcContext context) {
		for(DataFilter item : items) {
			if(!item.filter(data, context)) {
				return false;
			}
		}
		return true;
	}

}
