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

com.jonpereiradev.jfile.reader.rule.column.DomainRefRule Maven / Gradle / Ivy

package com.jonpereiradev.jfile.reader.rule.column;

import com.jonpereiradev.jfile.reader.file.JFileColumn;

import java.util.List;

public class DomainRefRule extends AbstractRefRule {

    private final List domains;
    private final Class clazz;

    @SuppressWarnings("unchecked")
    public DomainRefRule(int refPosition, int position, List domains) {
        super(refPosition, position);
        this.domains = domains;
        this.clazz = (Class) domains.get(0).getClass();
    }

    @Override
    public boolean isValid(JFileColumn fileColumn) {
        return domains.contains(fileColumn.getContent(clazz));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy