

class Foo {
	private int id;
	private float score;
	String name;

	public Foo(int i, float s, String n) {
		id = i;
		score = s;
		name = n;
	}

	@Override
	public boolean equals(Object o) {
		if (!(o instanceof Foo)) {
			return false;
		}

		Foo that = (Foo) o;
		
		return (this.id == that.id &&
			Math.abs(this.score - that.score) < 0.000001 &&    // better way to compare floats
			this.name.equals(that.name)); 
	}
}
