package com.srbenoit.xml;
/**
* A generic span that covers a tag.
*/
public class TagSpan {
/** the index of the start of the tag (the < character) */
public final transient int start;
/** the index of the end of the tag (the > character) */
public final transient int end;
/** true
if this is an open (or empty) tag */
public final transient boolean isOpen;
/** true
if this is a close (or empty) tag */
public final transient boolean isClose;
/** the index of the start of the tag name */
public final transient int nameStart;
/** the index of the end of the tag name */
public final transient int nameEnd;
/**
* Constructs a new TagSpan
.
*
* @param startPos the start position of the tag
* @param endPos the end position of the tag
* @param open true
if this is an open (or empty) tag
* @param close true
if this is a close (or empty) tag
* @param nameStartPos the start position of the tag name
* @param nameEndPos the end position of the tag name
*/
public TagSpan(final int startPos, final int endPos, final boolean open, final boolean close,
final int nameStartPos, final int nameEndPos) {
this.start = startPos;
this.end = endPos;
this.isOpen = open;
this.isClose = close;
this.nameStart = nameStartPos;
this.nameEnd = nameEndPos;
}
}