com.atomikos.finitestates.Transition Maven / Gradle / Ivy
package com.atomikos.finitestates;
import com.atomikos.recovery.TxState;
public class Transition {
public final TxState from;
public final TxState to;
public Transition(TxState from, TxState to) {
super();
this.from = from;
this.to = to;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((from == null) ? 0 : from.hashCode());
result = prime * result + ((to == null) ? 0 : to.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Transition other = (Transition) obj;
if (from != other.from)
return false;
if (to != other.to)
return false;
return true;
}
}