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

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