public static List<TransportProtocol> getTransportProtocols() {int cnt = protocols.size();List<TransportProtocol> res = new ArrayList<>(cnt);for (WeakReference<TransportProtocol> ref : protocols) {TransportProtocol proto = ref.get();if (proto != null)res.add(proto);elseprotocols.remove(ref);}return Collections.unmodifiableList(res);}

public static List < TransportProtocol > getTransportProtocols ( ) { int cnt = protocols . size ( ) ; List < TransportProtocol > res = new ArrayList < > ( cnt ) ; for ( WeakReference < TransportProtocol > ref : protocols ) { TransportProtocol proto = ref . get ( ) ; if ( proto != null ) res . add ( proto ) ; elseprotocols . remove ( ref ) ; } return Collections . unmodifiableList ( res ) ; }
public static IList<TransportProtocol> GetTransportProtocols(){int cnt = protocols.Count;IList<TransportProtocol> res = new AList<TransportProtocol>(cnt);foreach (JavaWeakReference<TransportProtocol> @ref in protocols){TransportProtocol proto = @ref.Get();if (proto != null){res.AddItem(proto);}else{protocols.Remove(@ref);}}return Sharpen.Collections.UnmodifiableList(res);}
