made Tag type modifiable
@@ -14,6 +14,10 @@ public class Tag extends Token implements Comparable<Tag> {
"(</(" + TAG_NAME + ")[^>]*>)|" +
"(<!--)|(-->)");
+ public void setType(Type type) {
+ this.type = type;
+ }
+
public enum Type {
OPENING_TAG,
CLOSING_TAG,
@@ -66,7 +70,7 @@ public class Tag extends Token implements Comparable<Tag> {
return new Tag(other.name, other.text, other.leftSpace, other.rightSpace, other.position, other.type, other.dtd);
}
- protected final Type type; /* tag type */
+ protected Type type; /* tag type */
protected final String name; /* tag name */
protected boolean leftSpace; /* true if there is at least one space on the left of the tag*/
/* position of the word after which the tag is placed; indexes of words start from 0
