001package Torello.HTML;
002
003/**
004 * <CODE>ReplaceFunction - Documentation.</CODE><BR /><BR />
005 * <EMBED CLASS="external-html" DATA-FILE-ID="RF">
006 */
007@FunctionalInterface
008public interface ReplaceFunction extends java.io.Serializable
009{
010    /** <EMBED CLASS="external-html" DATA-FILE-ID="SVUIDFI">  */
011    public static final long serialVersionUID = 1;
012
013    /**
014     * The intention here is to provide a "replace node" for a particular position in the
015     * original-{@code Vector<HTMLNode>}
016     * @param n This is the "old node" that needs replacing.  It will have been obtained
017     * from the original HTML page {@code Vector}.
018     * @param curVecPos The position in the original {@code Vector}.  This value can be
019     * ignored, but is provided as a matter of convenience.
020     * @param iterationCount The for-loop that will be making calls to
021     * {@code 'getReplacement(...)'} provides the a loop-count to this method.  All that means
022     * is there is a "loop variable" that is updated-by-one (incremented) each time this method is
023     * called.
024     * @return A new node for to be substituted at the position identified by curArrPos.
025     */
026    public HTMLNode getReplacement(HTMLNode n, int curVecPos, int iterationCount);
027}