public static CStateChange changeBend(
      final CStateFactory<?, ?> m_factory,
      final MouseEvent event,
      final HitInfo hitInfo,
      final Bend oldBend) {
    final Bend bend = hitInfo.getHitBend();

    if (bend == oldBend) {
      return new CStateChange(m_factory.createBendHoverState(bend, event), true);
    } else {
      m_factory.createBendExitState(oldBend, event);

      return new CStateChange(m_factory.createBendEnterState(bend, event), true);
    }
  }
Changes the state of the bend depending on the current hitInfo.

@param m_factory The state factory for all states.
@param event The mouse event that caused the state change.
@param hitInfo The information about what was hit.
@param oldBend The bend which we come from.
@return The state object that describes the mouse state.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/transformations/CHitBendsTransformer.java