

class Entity {

	private String field1 = null;
	private int field2 = 0;

	public Entity (String f1, int f2) {
		this.field1 = f1;
		this.field2 = f2;
	}

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

		Entity that = (Entity) obj;

		return (this.field1.equals(that.field1) &&
			this.field2 == that.field2);
	}
} // end of class


