package ducttape.workflow

trait Branch {
  val name: String
  val baseline: Boolean
  val branchPoint: BranchPoint
  
  override def hashCode() = name.hashCode
  override def equals(obj: Any) = obj match { // TODO: Take advantage of pooling
    case that: Branch => {
      (this.baseline == that.baseline || this.name == that.name) && this.branchPoint == that.branchPoint
    }
  }
  override def toString() = "%s:%s".format(branchPoint.name, name)
}

package ducttape.workflow

trait Branch {
  val name: String
  val baseline: Boolean
  val branchPoint: BranchPoint
  
  override def hashCode() = name.hashCode
  override def equals(obj: Any) = obj match { // TODO: Take advantage of pooling
    case that: Branch => {
      (this.baseline && that.baseline || this.name == that.name) && this.branchPoint == that.branchPoint
    }
  }
  override def toString() = "%s:%s".format(branchPoint.name, name)
}

Fix major bug that resulted in branches being confused for one another. It turns out that all logical operators aren't equivalent.
Fix major bug that resulted in branches being confused for one another. It turns out that all logical operators aren't equivalent.
