private static Collection<Collection<DsnNetPin>> create_ordered_subnets(Collection<DsnNetPin> p_pin_list){
  Collection<Collection<DsnNetPin>> result=new LinkedList<Collection<DsnNetPin>>();
  if (p_pin_list.isEmpty()) {
    return result;
  }
  Iterator<DsnNetPin> it=p_pin_list.iterator();
  DsnNetPin prev_pin=it.next();
  while (it.hasNext()) {
    DsnNetPin next_pin=it.next();
    Set<DsnNetPin> curr_subnet_pin_list=new java.util.TreeSet<DsnNetPin>();
    curr_subnet_pin_list.add(prev_pin);
    curr_subnet_pin_list.add(next_pin);
    result.add(curr_subnet_pin_list);
    prev_pin=next_pin;
  }
  return result;
}

private static Collection < Collection < DsnNetPin > > create_ordered_subnets ( Collection < DsnNetPin > p_pin_list ) { Collection < Collection < DsnNetPin > > result = new LinkedList < Collection < DsnNetPin > > ( ) ; if ( p_pin_list . isEmpty ( ) ) { return result ; } Iterator < DsnNetPin > it = p_pin_list . iterator ( ) ; DsnNetPin prev_pin = it . next ( ) ; while ( it . hasNext ( ) ) { DsnNetPin next_pin = it . next ( ) ; Set < DsnNetPin > curr_subnet_pin_list = new java . util . TreeSet < DsnNetPin > ( ) ; curr_subnet_pin_list . add ( prev_pin ) ; curr_subnet_pin_list . add ( next_pin ) ; result . add ( curr_subnet_pin_list ) ; prev_pin = next_pin ; } return result ; }
creates a sequence of subnets with 2 pins from p_pin_list
