public static List<OFPhysicalPort> ofPhysicalPortListOf(Collection<ImmutablePort> ports){
  if (ports == null) {
    throw new NullPointerException("Port list must not be null");
  }
  ArrayList<OFPhysicalPort> ofppList=new ArrayList<OFPhysicalPort>(ports.size());
  for (  ImmutablePort p : ports) {
    if (p == null)     throw new NullPointerException("Port must not be null");
    ofppList.add(p.toOFPhysicalPort());
  }
  return ofppList;
}

public static List < OFPhysicalPort > ofPhysicalPortListOf ( Collection < ImmutablePort > ports ) { if ( ports == null ) { throw new NullPointerException ( "Port list must not be null" ) ; } ArrayList < OFPhysicalPort > ofppList = new ArrayList < OFPhysicalPort > ( ports . size ( ) ) ; for ( ImmutablePort p : ports ) { if ( p == null ) throw new NullPointerException ( "Port must not be null" ) ; ofppList . add ( p . toOFPhysicalPort ( ) ) ; } return ofppList ; }
convert a collection of immutableport to a list of ofphyscialports . all immutableports in the collection must be non - null . no other checks ( name / number uniqueness ) are performed
