private Set<PinSwappable> calculate_swap_pin_infos(){
  TreeSet<PinSwappable> result=new TreeSet<PinSwappable>();
  if (target_set == null)   return result;
  for (  BrdItem curr_item : target_set) {
    if (!(curr_item instanceof BrdAbitPin))     continue;
    BrdAbitPin a_pin=(BrdAbitPin)curr_item;
    Collection<BrdAbitPin> curr_swapppable_pins=a_pin.get_swappable_pins();
    for (    BrdAbitPin curr_swappable_pin : curr_swapppable_pins) {
      result.add(new PinSwappable(r_board,curr_swappable_pin));
    }
  }
  ItemSelectionFilter selection_filter=new ItemSelectionFilter(ItemSelectionChoice.PINS);
  Collection<BrdItem> picked_items=r_board.pick_items(prev_corner,layer_active_no,selection_filter);
  for (  BrdItem curr_item : picked_items) {
    if (!(curr_item instanceof BrdAbitPin))     continue;
    BrdAbitPin a_pin=(BrdAbitPin)curr_item;
    Collection<BrdAbitPin> curr_swapppable_pins=a_pin.get_swappable_pins();
    for (    BrdAbitPin curr_swappable_pin : curr_swapppable_pins) {
      result.add(new PinSwappable(r_board,curr_swappable_pin));
    }
  }
  return result;
}

private Set < PinSwappable > calculate_swap_pin_infos ( ) { TreeSet < PinSwappable > result = new TreeSet < PinSwappable > ( ) ; if ( target_set == null ) return result ; for ( BrdItem curr_item : target_set ) { if ( ! ( curr_item instanceof BrdAbitPin ) ) continue ; BrdAbitPin a_pin = ( BrdAbitPin ) curr_item ; Collection < BrdAbitPin > curr_swapppable_pins = a_pin . get_swappable_pins ( ) ; for ( BrdAbitPin curr_swappable_pin : curr_swapppable_pins ) { result . add ( new PinSwappable ( r_board , curr_swappable_pin ) ) ; } } ItemSelectionFilter selection_filter = new ItemSelectionFilter ( ItemSelectionChoice . PINS ) ; Collection < BrdItem > picked_items = r_board . pick_items ( prev_corner , layer_active_no , selection_filter ) ; for ( BrdItem curr_item : picked_items ) { if ( ! ( curr_item instanceof BrdAbitPin ) ) continue ; BrdAbitPin a_pin = ( BrdAbitPin ) curr_item ; Collection < BrdAbitPin > curr_swapppable_pins = a_pin . get_swappable_pins ( ) ; for ( BrdAbitPin curr_swappable_pin : curr_swapppable_pins ) { result . add ( new PinSwappable ( r_board , curr_swappable_pin ) ) ; } } return result ; }
returns all pins , which can be reached by a pin swap from a start or target pin .
