private static void findSnap(Collection<ConstraintWidget> widgets,ConstraintWidget widget,SnapCandidate candidate,boolean checkHorizontal){
  ArrayList<ConstraintAnchor> anchorsSource=widget.getAnchors();
  for (  ConstraintWidget w : widgets) {
    if (w == widget) {
      continue;
    }
    ArrayList<ConstraintAnchor> anchorsTarget=w.getAnchors();
    for (    ConstraintAnchor as : anchorsSource) {
      if (checkHorizontal && as.isVerticalAnchor()) {
        continue;
      }
 else       if (!checkHorizontal && !as.isVerticalAnchor()) {
        continue;
      }
      for (      ConstraintAnchor at : anchorsTarget) {
        snapCheck(as,at,candidate,CONNECTION_SLOPE);
      }
    }
  }
}

private static void findSnap ( Collection < ConstraintWidget > widgets , ConstraintWidget widget , SnapCandidate candidate , boolean checkHorizontal ) { ArrayList < ConstraintAnchor > anchorsSource = widget . getAnchors ( ) ; for ( ConstraintWidget w : widgets ) { if ( w == widget ) { continue ; } ArrayList < ConstraintAnchor > anchorsTarget = w . getAnchors ( ) ; for ( ConstraintAnchor as : anchorsSource ) { if ( checkHorizontal && as . isVerticalAnchor ( ) ) { continue ; } else if ( ! checkHorizontal && ! as . isVerticalAnchor ( ) ) { continue ; } for ( ConstraintAnchor at : anchorsTarget ) { snapCheck ( as , at , candidate , CONNECTION_SLOPE ) ; } } } }
utility function iterating through the anchors of a widget , comparing their position with all the anchors of other widgets , and calling the snapcheck ( ) function .
