@Override
	public boolean equals(Object loan){
		if (loan == null)
			return false;
		Loan l = (Loan)loan;
		
		//first of all, if the two loans are void, they are equal
		if(l.isVoidLoan() && voidLoan)
			return true;
		if((l.isVoidLoan() && !voidLoan) || (!l.isVoidLoan() && voidLoan))
			return false;
		
		//System.out.println("the loan " + loan);
		boolean res = this.media.equals(l.media) 
			&& this.lender.equals(l.lender) 
			&& (this.returnDate.equals(l.returnDate));
		return res;	
	}