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

io.github.mike10004.debutils.BufferedDebContents Maven / Gradle / Ivy

package io.github.mike10004.debutils;

import javax.annotation.Nullable;
import java.util.List;
import java.util.function.Predicate;

class BufferedDebContents implements DebContents {

    private final List index;

    public BufferedDebContents(List index) {
        this.index = List.copyOf(index);
    }

    @Override
    @Nullable
    public DebEntry findEntry(Predicate filter) {
        return index().stream().filter(filter).findFirst().orElse(null);
    }

    @Override
    public List index() {
        return index;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy