/*
InstRow.java
(c) 2009-2015 Edward Swartz
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
*/
package v9t9.gui.client.swt.shells.debugger;
import v9t9.common.asm.RawInstruction;
import v9t9.common.cpu.ChangeBlock;
/**
* @author ejs
*
*/
public class InstRow {
private static int gCounter;
private final int count = gCounter++;
private final ChangeBlock block;
private boolean isGeneric;
public InstRow(ChangeBlock block, boolean isGeneric) {
this.block = block;
this.isGeneric = isGeneric;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
InstRow other = (InstRow) obj;
if (count != other.count) {
return false;
}
return true;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return count;
}
/**
* @return
*/
public boolean isGeneric() {
return isGeneric;
}
public RawInstruction getInst() {
return block.inst;
}
public ChangeBlock getBlock() {
return block;
}
}