package me.devsaki.hentoid.dirpicker.model;

import androidx.annotation.NonNull;

import java.io.File;
import java.util.Objects;

/**
 * Created by avluis on 06/12/2016.
 * File Builder
 */
public class FileBuilder extends File {
    private String name;

    public FileBuilder(String path) {
        super(path);
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof FileBuilder)) {
            return false;
        }

        FileBuilder fileBuilder = (FileBuilder) o;

        return this == o || Objects.equals(fileBuilder.getName(), name);
    }

    @NonNull
    @Override
    public String getName() {
        if (this.name != null) {
            return this.name;
        }

        return super.getName();
    }

    public void setName(String name) {
        this.name = name;
    }
}

@@ -575,24 +575,204 @@
 me);%0A    %7D%0A%0A
+    @Override%0A    public int hashCode() %7B%0A        int result = super.hashCode();%0A        result = 31 * result + (name != null ? name.hashCode() : 0);%0A        return result;%0A    %7D%0A%0A
     @NonNull

Implement hashCode along equals