@Override
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if(!(obj instanceof Lock))
			return false;
		Lock l = (Lock) obj;
		return (transaction.equals(l.getTransaction()) && (index == l.getIndex()) && isWrite == l.isWrite());
	}