/*----------------------------------------------------------------------------
Copyright (C) 1998 Object International Software GmbH
----------------------------------------------------------------------------*/
package oisoft.togetherx.scriptapi.UML.enums;
import java.util.Enumeration;
import oisoft.togetherx.scriptapi.UML.UMLElement;
import oisoft.togetherx.scriptapi.UML.UMLVisitor;
//------------------------------------------------------------------------------
/**
* Implemented typified enumeration for UMLElement
* @version 2.1.01 Thu Apr 02 19:15:21 1998
* @author Andrei Ivanov
*/
public class UMLElementEnumeration implements Enumeration
{
public UMLElementEnumeration(Enumeration e)
{
imp = e;
}
public UMLElement getNextUMLElement()
{
if (imp != null)
return (UMLElement) imp.nextElement();
else
return null;
}
public Object nextElement()
{
if (imp != null)
return imp.nextElement();
else
return null;
}
public boolean hasMoreElements()
{
if (imp != null)
return imp.hasMoreElements();
else
return false;
}
public void accept_to_all(UMLVisitor v)
{
if (imp != null) {
while (imp.hasMoreElements()) {
UMLElement element = (UMLElement) imp.nextElement();
element.accept(v);
}
}
}
protected Enumeration imp;
}
//------------------------------------------------------------------------------ |