1 /*
2 * Copyright (c) 2004 World Wide Web Consortium,
3 *
4 * (Massachusetts Institute of Technology, European Research Consortium for
5 * Informatics and Mathematics, Keio University). All Rights Reserved. This
6 * work is distributed under the W3C(r) Software License [1] in the hope that
7 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
8 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 *
10 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11 */
13 package org.w3c.dom.views;
15 import org.w3c.dom.Node;
17 /**
18 * The <code>MatchSet</code> identifies <code>Segment</code>s where a set of
19 * matches evaluate in a specified way.
20 * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226'>Document Object Model (DOM) Level 3 Views and Formatting
21 Specification</a>.
22 * @since DOM level 3
23 */
24 public interface MatchSet extends Match {
25 /**
26 * The Node value to be compared against, which is specified during
27 * construction.
28 */
29 public Node getNodeArg();
31 /**
32 * Adds a specific <code>Match</code> to the set.
33 * @param add The <code>Match</code> to be added.After adding a match,
34 * the results of any related call to <code>getNext</code> are
35 * unpredictable until the segment has been requested again by calling
36 * <code>matchFirstSegment</code>.
37 */
38 public void addMatch(Match add);
40 /**
41 * Returns a specific <code>Match</code>, of the set, which is to be
42 * matched during <code>MatchSet</code> evaluation, or returns null if
43 * the specified index does not correspond to a <code>Match</code>.
44 * @param index The index of the <code>Match</code> to be retrieved.
45 * @return The requested match, if any, or null.
46 */
47 public Match getMatch(int index);
49 }