@Override
    public boolean equals(Object other) {
    	if(other == null) { //check first if the other object is null
    		return false;
    	}
    	if(other.getClass().equals(this.getClass())) {
    		Item toCompare = (Item) other;
    		boolean equal = (other == this) || //if they are the same object
    						((this.description.equals(toCompare.description)) && //compare each property of the item
    						(this.name.equals(toCompare.name)) &&
    						(this.type.equals(toCompare.type)) &&
    						(this.value == toCompare.value) &&
    						(this.weight == toCompare.weight));
    		return equal;    		
    	}
    	
    	return false;
    }