/[classpath]/classpath/gnu/java/util/DoubleEnumeration.java
ViewVC logotype

Diff of /classpath/gnu/java/util/DoubleEnumeration.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tromey, Fri Apr 23 21:13:20 2004 UTC revision 1.3.2.1 by tromey, Mon Nov 1 15:57:08 2004 UTC
# Line 1  Line 1 
1  /* gnu.java.util.DoubleEnumeration  /* gnu.java.util.DoubleEnumeration
2     Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.     Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 63  import java.util.NoSuchElementException; Line 63  import java.util.NoSuchElementException;
63   * @author Jochen Hoenicke   * @author Jochen Hoenicke
64   * @author Mark Wielaard (mark@klomp.org)   * @author Mark Wielaard (mark@klomp.org)
65   */   */
66  public class DoubleEnumeration implements Enumeration  public class DoubleEnumeration<T> implements Enumeration<T>
67  {  {
68    /**    /**
69     * This is true as long as one of the enumerations has more     * This is true as long as one of the enumerations has more
# Line 82  public class DoubleEnumeration implement Line 82  public class DoubleEnumeration implement
82    /**    /**
83     * The first enumeration.     * The first enumeration.
84     */     */
85    private Enumeration e1;    private Enumeration<T> e1;
86    /**    /**
87     * The second enumeration.     * The second enumeration.
88     */     */
89    private Enumeration e2;    private Enumeration<T> e2;
90    
91    /**    /**
92     * Creates a new Enumeration combining the given two enumerations.     * Creates a new Enumeration combining the given two enumerations.
93     * The enumerations mustn't be accessed by other classes.     * The enumerations mustn't be accessed by other classes.
94     */     */
95    public DoubleEnumeration(Enumeration e1, Enumeration e2)    public DoubleEnumeration(Enumeration<T> e1, Enumeration<T> e2)
96    {    {
97      this.e1 = e1;      this.e1 = e1;
98      this.e2 = e2;      this.e2 = e2;
# Line 126  public class DoubleEnumeration implement Line 126  public class DoubleEnumeration implement
126     * element of the second enumeration. If both enumeration don't have     * element of the second enumeration. If both enumeration don't have
127     * any elements it throws a <code>NoSuchElementException</code>.     * any elements it throws a <code>NoSuchElementException</code>.
128     */     */
129    public Object nextElement()    public T nextElement()
130    {    {
131      if (!hasMoreElements())      if (!hasMoreElements())
132        throw new NoSuchElementException();        throw new NoSuchElementException();

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26