public class Segment extends TextPart
TextPart with an identifier.| Modifier and Type | Field and Description |
|---|---|
String |
id
Identifier of this segment.
|
static String |
REF_MARKER |
annotations, properties, text| Constructor and Description |
|---|
Segment()
Creates an empty Segment object with a null identifier.
|
Segment(String id)
Creates an empty Segment object with a given identifier.
|
Segment(String id,
TextFragment text)
Creates a Segment object with a given identifier and a given
text fragment.
|
| Modifier and Type | Method and Description |
|---|---|
Segment |
clone() |
void |
forceId(String id)
Forces the id of this segment to a specific value.
|
String |
getId()
Gets the identifier for this segment.
|
boolean |
isSegment()
Indicates if this part is a
Segment. |
static String |
makeRefMarker(String segId) |
getAnnotation, getAnnotations, getContent, getProperty, getPropertyNames, hasProperty, removeProperty, setAnnotation, setContent, setProperty, toStringpublic static final String REF_MARKER
public String id
public Segment()
public Segment(String id)
id - identifier for the new segment (Can be null).public Segment(String id, TextFragment text)
id - identifier for the new segment (Can be null).text - text fragment for the new segment.public boolean isSegment()
TextPartSegment.public String getId()
public void forceId(String id)
id - the new value of the segment.Copyright © 2019. All rights reserved.