|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.ref.model.Segment
public class Segment
Representation of a Section of a document.
Constructor Summary | |
---|---|
Segment(java.lang.String value,
int offset)
Constructor of the Segment |
Method Summary | |
---|---|
boolean |
contains(int offset,
int length)
Verifies if the section starting in a given offset and with a given length is contained in this segment. |
int |
getOffset()
Obtains the value of the starting position of the segment in the document |
java.lang.String |
getValue()
Obtains the value of the segment |
java.lang.String |
getValue(int offset,
int length)
Obtains the substring of the section starting at a given offset and with a given length |
void |
setOffset(int offset)
Sets the value of the starting position of the segment in the document |
void |
setValue(java.lang.String value)
Sets the value of segment |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Segment(java.lang.String value, int offset)
value
- the text representation of the segmentoffset
- the offset that indicates the starting position of the segment in documentMethod Detail |
---|
public void setValue(java.lang.String value)
value
- value to be setpublic java.lang.String getValue()
public void setOffset(int offset)
offset
- starting position to be setpublic int getOffset()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean contains(int offset, int length)
offset
- the offset that indicates the starting position of the section in documentlength
- the length of the section
public java.lang.String getValue(int offset, int length)
offset
- start of the substring to be retrievedlength
- size of the substring to be retrieved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |