blob: 9ef7b1bee42d32ff75b8f4f4cc6ed17d7a0db82b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2009 Andrea Bittau, University College London, and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrea Bittau - initial API and implementation from the PsychoPath XPath 2.0
*******************************************************************************/
package org.eclipse.wst.xml.xpath2.processor.ast;
import java.util.*;
import org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathNode;
import org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathVisitor;
/**
* Support for XPath.
*/
public class XPath extends XPathNode {
private Collection _exprs;
/**
* Constructor for XPath.
*
* @param exprs
* XPath expressions.
*/
public XPath(Collection exprs) {
_exprs = exprs;
}
/**
* Support for Visitor interface.
*
* @return Result of Visitor operation.
*/
@Override
public Object accept(XPathVisitor v) {
return v.visit(this);
}
/**
* Support for Iterator interface.
*
* @return Result of Iterator operation.
*/
public Iterator iterator() {
return _exprs.iterator();
}
}