Code example for Date

Methods: hashCode

0
 
	@Override 
	public int hashCode() { 
		final int prime = 31;
		int result = 1;
		result = prime * result + ((dateAcquired == null) ? 0 : dateAcquired.hashCode());
		result = prime * result + ((description == null) ? 0 : description.hashCode());
		result = prime * result + ((inventoryItemNumber == null) ? 0 : inventoryItemNumber.hashCode());
		result = prime * result + ((itemCategory == null) ? 0 : itemCategory.hashCode());
		result = prime * result + ((itemCondition == null) ? 0 : itemCondition.hashCode());
		result = prime * result + ((itemStatus == null) ? 0 : itemStatus.hashCode());
		result = prime * result + Float.floatToIntBits(price);
		result = prime * result + ((propertyNumber == null) ? 0 : propertyNumber.hashCode());
		result = prime * result + ((stockNumber == null) ? 0 : stockNumber.hashCode());
		result = prime * result + ((unit == null) ? 0 : unit.hashCode());
		return result;
	} 
 
	@Override 
	public boolean equals(Object obj) {
		if (this == obj)