|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.doc.FragmentPosition
public class FragmentPosition
Position of an fragment in a document.
| Nested Class Summary | |
|---|---|
static class |
FragmentPosition.FragmentPositionComp
|
static class |
FragmentPosition.NotFragmentPositionComp
|
| Field Summary | |
|---|---|
int |
ini
index of Element start position. |
| Constructor Summary | |
|---|---|
FragmentPosition()
Constructor. |
|
FragmentPosition(FragmentPosition pos)
Copy constructor. |
|
FragmentPosition(int ini,
int size)
Constructor. |
|
| Method Summary | |
|---|---|
int |
compareTo(FragmentPosition o)
|
static FragmentPosition |
enclosed(FragmentPosition start_tag,
FragmentPosition close_tag)
Computes the Position of the element enclosed by two Positions. |
boolean |
equals(Object obj)
|
int |
getEnd()
|
int |
getStart()
|
int |
hashCode()
|
static FragmentPosition |
merge(FragmentPosition start_tag,
FragmentPosition close_tag)
Computes the Position of the element resulting from the merge of other two. |
void |
set(FragmentPosition pos)
Similar to copy constructor. |
void |
setEnd(int post_end)
|
void |
shift(int offset)
Shifts the position by offset. |
int |
size()
Gets the size of the current fragment. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int ini
| Constructor Detail |
|---|
public FragmentPosition()
Builds a fragment position starting at index zero, and of size zero.
public FragmentPosition(int ini,
int size)
ini - the start index of the fragment.size - the size of the fragment.public FragmentPosition(FragmentPosition pos)
pos - the FragmentPosition object to be copied.| Method Detail |
|---|
public final int getStart()
public final int getEnd()
public void setEnd(int post_end)
public final int size()
public void set(FragmentPosition pos)
pos - the FragmentPosition object to be copied.public void shift(int offset)
offset.
offset - the offset to shift the position forward.
public static FragmentPosition enclosed(FragmentPosition start_tag,
FragmentPosition close_tag)
throws DocumentException
start_tag - the Position of the opening tag.close_tag - the Position of the closing tag.
HTMLDocumentException - if the enclosing positions are inconsistent (e.g. enclosing
tags overlap or are inverted).
DocumentException
public static FragmentPosition merge(FragmentPosition start_tag,
FragmentPosition close_tag)
throws DocumentException
start_tag - the Position of the opening tag.close_tag - the Position of the closing tag.
HTMLDocumentException - if the given positions are inconsistent (e.g. enclosing tags
overlap or are inverted).
DocumentExceptionpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int compareTo(FragmentPosition o)
compareTo in interface Comparable<FragmentPosition>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||