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

com.daveayan.mirage.comparator.impl.LeafDoubleComparator Maven / Gradle / Ivy

There is a newer version: 1.9
Show newest version
package com.daveayan.mirage.comparator.impl;

import com.daveayan.mirage.ObjectComparator;
import com.daveayan.mirage.comparator.Comparator;


public class LeafDoubleComparator implements Comparator {
	public boolean canCompare(Object objectLeft, Object objectRight, ObjectComparator oc) {
		return (objectLeft instanceof Double) & (objectRight instanceof Double);
	}
	public boolean compare(Object objectLeft, Object objectRight, ObjectComparator oc) {
		return ((Double) objectLeft).equals((Double) objectRight);
	}	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy