Range
Overview
Range is a class in Aspose.Words FOSS for Java.
Inherits from: Iterable<Node>.
Represents a contiguous area in a document.
Edition status of its 19 listed members (a property and its accessor methods are listed separately, overloads once): 18 not yet exercised by a verified example.
This class declares 16 methods for Range objects in Java programs.
Available methods include: delete, getBookmarks, getFields, getFormFields, getRevisions, getStructuredDocumentTags, getText, iterator, normalizeFieldTypes, replace, toDocument, unlinkFields, and 1 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: bookmarks, fields, formFields, revisions, structuredDocumentTags, text.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
text | String | Read | Gets the text of the range. |
formFields | FormFieldCollection | Read | Returns a FormFields collection that represents all form fields in the range. |
bookmarks | BookmarkCollection | Read | Returns a Bookmarks collection that represents all bookmarks in the range. |
fields | FieldCollection | Read | Returns a Fields collection that represents all fields in the range. |
structuredDocumentTags | StructuredDocumentTagCollection | Read | Returns a StructuredDocumentTags collection that represents all structured document tags in the range. |
revisions | RevisionCollection | Read | Gets a collection of revisions (tracked changes) that exist in this range. |
Methods
| Signature | Description |
|---|---|
getText() → String | Gets the text of the range. |
getFormFields() → FormFieldCollection | Returns a FormFields collection that represents all form fields in the range. |
getBookmarks() → BookmarkCollection | Returns a Bookmarks collection that represents all bookmarks in the range. |
getFields() → FieldCollection | Returns a Fields collection that represents all fields in the range. |
getStructuredDocumentTags() → StructuredDocumentTagCollection | Returns a StructuredDocumentTags collection that represents all structured document tags in the range. |
delete() | Deletes all characters of the range. |
replace(pattern: String, replacement: String) → int | Replaces all occurrences of a specified character string pattern with a replacement string. |
replace(pattern: java.util.regex.Pattern, replacement: String) → int | Performs a regex replace across the range and returns the number of replacements made |
replace(pattern: String, replacement: String, options: FindReplaceOptions) → int | Replaces all occurrences of a specified character string pattern with a replacement string. |
replace(pattern: java.util.regex.Pattern, replacement: String, options: FindReplaceOptions) → int | Calls replace(pattern, replacement, options) on this Range instance. |
updateFields() | Updates the values of document fields in this range. |
unlinkFields() | Unlinks fields in this range. |
normalizeFieldTypes() | Changes field type values FieldType of FieldStart, FieldSeparator, FieldEnd in this range so that they correspond to the field types contained in the field codes. |
toDocument() → Document | Constructs a new fully formed document that contains the range. |
iterator() → Iterator<Node> | Calls iterator on this Range instance. |
getRevisions() → RevisionCollection | Gets a collection of revisions (tracked changes) that exist in this range. |