class Files2 {

    @Nullable
    public static File getAbsoluteFile(@NonNull File[] paths, @NonNull File file) {
        if (file.isAbsolute()) {
            return file;
        }
        for (File parent : paths) {
            File result = new File(parent, file.getPath());
            if (result.exists()) {
                return result;
            }
        }
        // relative file outside paths
        return null;
    }

    private  Files2();

}