public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Prestamo other = (Prestamo) obj;
        if (this.libro != other.libro && (this.libro == null || !this.libro.equals(other.libro))) {
            return false;
        }
        if (this.socio != other.socio && (this.socio == null || !this.socio.equals(other.socio))) {
            return false;
        }
        return true;
    }