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

com.iwillfailyou.inspections.allfinal.nonfinals.ExcludeCatchParams Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
package com.iwillfailyou.inspections.allfinal.nonfinals;

import com.iwillfailyou.inspection.InspectionException;
import com.iwillfailyou.inspection.Violations;
import org.cactoos.collection.Filtered;
import org.cactoos.list.ListOf;

import java.util.List;

public final class ExcludeCatchParams implements Violations {

    private final Violations origin;

    public ExcludeCatchParams(final Violations origin) {
        this.origin = origin;
    }

    @Override
    public List asList() throws InspectionException {
        return new ListOf<>(
            new Filtered<>(
                (final Nonfinal valuation) -> !valuation.isCatchParam(),
                origin.asList()
            )
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy