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

com.github.junrar.ContentDescription Maven / Gradle / Ivy

There is a newer version: 7.5.5
Show newest version
package com.github.junrar;

public class ContentDescription {
    public String path;
    public long size;

    public ContentDescription(String path, long size) {
        this.path = path;
        this.size = size;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((path == null) ? 0 : path.hashCode());
        result = prime * result + (int) (size ^ (size >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        ContentDescription other = (ContentDescription) obj;
        if (path == null) {
            if (other.path != null) {
                return false;
            }
        } else if (!path.equals(other.path)) {
            return false;
        }
        return size == other.size;
    }

    @Override
    public String toString() {
        return path + ": " + size;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy