/*
 * CampoLlenoOtroVacioViceversa.java
 *
 * Created on 22 de marzo de 2007, 10:46 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.fidufosyga.rules;

/**
 * 
 * @author Julian
 */
public class CampoLlenoOtroVacioViceversa extends AbstractRule {

	/** Creates a new instance of CampoVacio */
	public CampoLlenoOtroVacioViceversa() {
	}

	public boolean performValidation(String field, String registro[],
			String nombreArchivo) {
		if (field.length() == 0
				&& registro[new Integer((String) getParams()[0]).intValue()]
						.length() > 0) {
			return true;

		}
		if (field.length() > 0
				&& registro[new Integer((String) getParams()[0]).intValue()]
						.length() == 0) {
			return true;

		}
		return false;

	}
}
