/*
 * CampoLlenoParaValorOtroCampoOtroVacio.java
 *
 * Created on 27 de marzo de 2007, 11:23 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.fidufosyga.rules;

/**
 * 12,C,13
 * 
 * @author Jsolano
 */
public class CampoLlenoParaValorOtroCampoOtroVacio extends AbstractRule {

	/** Creates a new instance of CampoLlenoParaUnValorDiferenteDeOtroCampo */

	public boolean performValidation(String field, String registro[],
			String nombreArchivo) {

		if (registro[new Integer((String) getParams()[0]).intValue()]
				.equals(getParams()[1])) {
			if (registro[new Integer((String) getParams()[2]).intValue()]
					.length() == 0)
				return (field.length() > 0);

		}

		return false;
	}

}