This makes the simple list objects in Jessie implement Iterable<T>, for T the list element type.

2006-06-05  Casey Marshall <[EMAIL PROTECTED]>

        * gnu/javax/net/ssl/provider/CipherSuiteList.java: implement
        Iterable<CipherSuite>.
        (iterator): new method.
        * gnu/javax/net/ssl/provider/CompressionMethodList.java: implement
        Iterable<CompressionMethod>.
        (iterator): new method.
        * gnu/javax/net/ssl/provider/X500PrincipalList.java: implement
        Iterable<X500Principal>.
        (iterator): new method.

### Eclipse Workspace Patch 1.0
#P classpath-ssl-nio
Index: gnu/javax/net/ssl/provider/CompressionMethodList.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/javax/net/ssl/provider/Attic/CompressionMethodList.java,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 CompressionMethodList.java
--- gnu/javax/net/ssl/provider/CompressionMethodList.java       3 Jun 2006 
07:49:53 -0000       1.1.4.1
+++ gnu/javax/net/ssl/provider/CompressionMethodList.java       6 Jun 2006 
00:43:14 -0000
@@ -51,7 +51,7 @@
  * A basic list interface to a list of compression methods in an SSL
  * packet.
  */
-public final class CompressionMethodList
+public final class CompressionMethodList implements Iterable<CompressionMethod>
 {
   private final ByteBuffer buffer;
   private int modCount;
@@ -188,6 +188,11 @@
     return true;
   }
 
+  public java.util.Iterator<CompressionMethod> iterator ()
+  {
+    return new Iterator ();
+  }
+  
   /**
    * An iterator for the elements in this list. The iterator supports
    * only the <code>set</code> method out of the optional methods,
Index: gnu/javax/net/ssl/provider/X500PrincipalList.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/javax/net/ssl/provider/Attic/X500PrincipalList.java,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 X500PrincipalList.java
--- gnu/javax/net/ssl/provider/X500PrincipalList.java   3 Jun 2006 07:49:53 
-0000       1.1.4.1
+++ gnu/javax/net/ssl/provider/X500PrincipalList.java   6 Jun 2006 00:43:14 
-0000
@@ -49,7 +49,7 @@
 
 import javax.security.auth.x500.X500Principal;
 
-public final class X500PrincipalList
+public final class X500PrincipalList implements Iterable<X500Principal>
 {
   private final ByteBuffer buffer;
   private int modCount;
@@ -184,6 +184,11 @@
     return true;
   }
 
+  public java.util.Iterator<X500Principal> iterator ()
+  {
+    return new Iterator();
+  }
+  
   public class Iterator implements ListIterator<X500Principal>
   {
     private final int modCount;
Index: gnu/javax/net/ssl/provider/CipherSuiteList.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/javax/net/ssl/provider/Attic/CipherSuiteList.java,v
retrieving revision 1.1.4.1
diff -u -r1.1.4.1 CipherSuiteList.java
--- gnu/javax/net/ssl/provider/CipherSuiteList.java     3 Jun 2006 07:49:53 
-0000       1.1.4.1
+++ gnu/javax/net/ssl/provider/CipherSuiteList.java     6 Jun 2006 00:43:14 
-0000
@@ -46,7 +46,7 @@
 import java.util.ListIterator;
 import java.util.NoSuchElementException;
 
-public final class CipherSuiteList
+public final class CipherSuiteList implements Iterable<CipherSuite>
 {
   private final ByteBuffer buffer;
   private final ProtocolVersion version;
@@ -191,6 +191,11 @@
     return true;
   }
 
+  public java.util.Iterator<CipherSuite> iterator ()
+  {
+    return new Iterator ();
+  }
+  
   /**
    * An iterator for the elements in this list. The iterator supports
    * only the <code>set</code> method out of the optional methods,

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to