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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 | package Torello.HTML;
import java.util.Comparator;
import java.io.Serializable;
/**
* This is a simple data-class whose primary reason for development was to provide a way for the
* NodeSearch Package classes to simultaneously return both a {@link TagNode} instance, and a
* {@code Vector}-index location (for that node) - <I>at the same time</I> - when searching HTML
* web-pages for HTML tags.
*
* <BR /><BR />
* <EMBED CLASS='external-html' DATA-FILE-ID=TAG_NODE_INDEX>
* <!-- <EMBED CLASS='external-html' DATA-FILE-ID=NODE_INDEX> -->
* <EMBED CLASS='external-html' DATA-FILE-ID=IMPLEMENTS_REPLACE>
*
* @see TagNode
* @see NodeIndex
* @see Torello.HTML.NodeSearch.TagNodePeek
* @see Torello.HTML.NodeSearch.InnerTagPeek
*/
public class TagNodeIndex
extends NodeIndex<TagNode>
implements CharSequence, Serializable, Cloneable
{
/** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
public static final long serialVersionUID = 1;
/**
* Constructor for this class.
* @param index This is the index of vectorized-page that contains {@code tagNode}
* @param tagNode This is the {@link TagNode} being stored in this data-structure.
* @throws IndexOutOfBoundsException if {@code index} is negative, this exception is thrown.
* @throws NullPointerException if {@code tagNode} is null.
*/
public TagNodeIndex(int index, TagNode tagNode)
{ super(index, tagNode); }
/**
* Java's {@code interface Cloneable} requirements. This instantiates a new
* {@code TagNodeIndex} with identical {@code TagNode n} and {@code int index} fields.
* @return A new {@code TagNodeIndex} whose internal fields are identical to this one.
*/
public TagNodeIndex clone() { return new TagNodeIndex(this.index, this.n); }
}
|