01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.net.core;
06:
07: public class ConnectionAddressIterator {
08:
09: private final ConnectionInfo[] cis;
10: private int current = -1;
11:
12: public ConnectionAddressIterator(ConnectionInfo[] cis) {
13: this .cis = cis;
14: }
15:
16: public boolean hasNext() {
17: return current < (cis.length - 1);
18: }
19:
20: public ConnectionInfo next() {
21: if (!hasNext())
22: return null;
23: return cis[++current];
24: }
25: }
|