All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jxls.reader.SimpleSectionCheck Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package org.jxls.reader;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Leonid Vysochyn
 */
public class SimpleSectionCheck implements SectionCheck {

    List offsetRowChecks = new ArrayList();

    public SimpleSectionCheck() {
    }

    public SimpleSectionCheck(List relativeRowChecks) {
        this.offsetRowChecks = relativeRowChecks;
    }

    public boolean isCheckSuccessful(XLSRowCursor cursor) {
        for (OffsetRowCheck offsetRowCheck : offsetRowChecks) {
            if (!offsetRowCheck.isCheckSuccessful(cursor)) {
                return false;
            }
        }
        return true;
    }

    public void addRowCheck(OffsetRowCheck offsetRowCheck) {
        offsetRowChecks.add( offsetRowCheck );
    }


    public List getOffsetRowChecks() {
        return offsetRowChecks;
    }

    public void setOffsetRowChecks(List offsetRowChecks) {
        this.offsetRowChecks = offsetRowChecks;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy