jpayne@68: package consensus; jpayne@68: jpayne@68: import java.io.Serializable; jpayne@68: jpayne@68: /** jpayne@68: * Superclass for BaseEdge and BaseNode. jpayne@68: * jpayne@68: * @author Brian Bushnell jpayne@68: * @date September 6, 2019 jpayne@68: * jpayne@68: */ jpayne@68: public abstract class BaseGraphPart extends ConsensusObject implements Serializable { jpayne@68: jpayne@68: /** jpayne@68: * jpayne@68: */ jpayne@68: private static final long serialVersionUID = 3854022870880887972L; jpayne@68: jpayne@68: /*--------------------------------------------------------------*/ jpayne@68: /*---------------- Initialization ----------------*/ jpayne@68: /*--------------------------------------------------------------*/ jpayne@68: jpayne@68: public BaseGraphPart(int type_){ jpayne@68: type=type_; jpayne@68: assert(type==REF || type==INS || type==DEL) : type; jpayne@68: } jpayne@68: jpayne@68: /*--------------------------------------------------------------*/ jpayne@68: /*---------------- Methods ----------------*/ jpayne@68: /*--------------------------------------------------------------*/ jpayne@68: jpayne@68: /** Name of this type */ jpayne@68: public final String typeString(){ jpayne@68: return TYPE_NAMES[type]; jpayne@68: } jpayne@68: jpayne@68: /** Name of this part */ jpayne@68: public abstract String partString(); jpayne@68: jpayne@68: /*--------------------------------------------------------------*/ jpayne@68: /*---------------- Fields ----------------*/ jpayne@68: /*--------------------------------------------------------------*/ jpayne@68: jpayne@68: /** Type of this part */ jpayne@68: public final int type; jpayne@68: jpayne@68: }