127 if (pv.v > protocolVersion.v) {
128 break; // Safe to break here as this.protocols is sorted
129 }
130 selectedVersion = pv;
131 }
132
133 return selectedVersion;
134 }
135
136 /**
137 * Return an array with the names of the ProtocolVersions in this list.
138 */
139 synchronized String[] toStringArray() {
140 if (protocolNames == null) {
141 protocolNames = new String[protocols.size()];
142 int i = 0;
143 for (ProtocolVersion version : protocols) {
144 protocolNames[i++] = version.name;
145 }
146 }
147 return (String[])protocolNames.clone();
148 }
149
150 public String toString() {
151 return protocols.toString();
152 }
153 }
|
127 if (pv.v > protocolVersion.v) {
128 break; // Safe to break here as this.protocols is sorted
129 }
130 selectedVersion = pv;
131 }
132
133 return selectedVersion;
134 }
135
136 /**
137 * Return an array with the names of the ProtocolVersions in this list.
138 */
139 synchronized String[] toStringArray() {
140 if (protocolNames == null) {
141 protocolNames = new String[protocols.size()];
142 int i = 0;
143 for (ProtocolVersion version : protocols) {
144 protocolNames[i++] = version.name;
145 }
146 }
147 return protocolNames.clone();
148 }
149
150 public String toString() {
151 return protocols.toString();
152 }
153 }
|