private Set<OsmElement> findViaElements(Way way){
  Set<OsmElement> result=new HashSet<OsmElement>();
  for (  Node n : way.getNodes()) {
    for (    Way w : logic.getWaysForNode(n)) {
      if (w.getTagWithKey(Tags.KEY_HIGHWAY) != null) {
        result.add(w);
        result.add(n);
      }
    }
  }
  return result;
}

private Set < OsmElement > findViaElements ( Way way ) { Set < OsmElement > result = new HashSet < OsmElement > ( ) ; for ( Node n : way . getNodes ( ) ) { for ( Way w : logic . getWaysForNode ( n ) ) { if ( w . getTagWithKey ( Tags . KEY_HIGHWAY ) != null ) { result . add ( w ) ; result . add ( n ) ; } } } return result ; }
finds which ways or nodes can be used as a via element in a restriction relation
