FileDocCategorySizeDatePackage
ChainEnumeration.javaAPI DocExample635Tue Dec 08 01:21:00 GMT 1998oisoft.togetherx.scripts.SQL.impl

ChainEnumeration.java

// Generated by Together
package oisoft.togetherx.scripts.SQL.impl;

import java.util.Enumeration;

public class ChainEnumeration implements Enumeration {
  private Enumeration myFirst;
  private Enumeration mySecond;
  public ChainEnumeration(Enumeration first, Enumeration second){
    myFirst = first;
    mySecond = second;
  }
  public boolean hasMoreElements(){
    return myFirst.hasMoreElements() || mySecond.hasMoreElements();
  }
  public Object nextElement(){
    if(myFirst.hasMoreElements()){
      return myFirst.nextElement();
    }
    else{
      return mySecond.nextElement();
    }
  }
}