1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package Torello.HTML;

/**
 * <CODE>ReplaceFunction - Documentation.</CODE><BR /><BR />
 * <EMBED CLASS="external-html" DATA-FILE-ID="RF">
 */
@FunctionalInterface
public interface ReplaceFunction extends java.io.Serializable
{
    /** <EMBED CLASS="external-html" DATA-FILE-ID="SVUIDFI">  */
    public static final long serialVersionUID = 1;

    /**
     * The intention here is to provide a "replace node" for a particular position in the
     * original-{@code Vector<HTMLNode>}
     * @param n This is the "old node" that needs replacing.  It will have been obtained
     * from the original HTML page {@code Vector}.
     * @param curVecPos The position in the original {@code Vector}.  This value can be
     * ignored, but is provided as a matter of convenience.
     * @param iterationCount The for-loop that will be making calls to
     * {@code 'getReplacement(...)'} provides the a loop-count to this method.  All that means
     * is there is a "loop variable" that is updated-by-one (incremented) each time this method is
     * called.
     * @return A new node for to be substituted at the position identified by curArrPos.
     */
    public HTMLNode getReplacement(HTMLNode n, int curVecPos, int iterationCount);
}