public interface MultiLineField
Modifier and Type | Method and Description |
---|---|
String |
getLine(int line)
Returns a specific line from the field's value.
|
String |
getLine(int line,
int offset)
Returns a specific line from the field's value.
Performs a semantic line retrieval based on the field components definition, so this is not the same as just splitting the value in lines and getting one of the lines with an index. If the field defines the first line components as optional and those components are not present in the particular field instance, then getLine(1) will return null because according to the field definition the first line is not present. Also notice that a line may be composed by several components, there is no linear relation between component numbers and lines numbers. The offset parameter is used to count lines from a specific component instead of the first one, and it is particularly useful when combined with the component static names, for example getLine(1, Field35B.DESCRIPTION) Notice than if the query includes a component offset, the result will not contain prefix component separators. |
List<String> |
getLines()
Returns the field value split into lines.
|
List<String> |
getLines(int offset)
Returns the field value starting at the offset component, split into lines.
|
List<String> |
getLinesBetween(int start,
int end)
Returns a specific subset of lines from the field's value, given a range.
|
List<String> |
getLinesBetween(int start,
int end,
int offset)
Returns a specific subset of lines from the field's value, starting at the offset component.
|
String getLine(int line)
line
- a reference to a specific line in the field, first line being 1getLine(int, int)
String getLine(int line, int offset)
line
- a reference to a specific line in the field, first line being 1offset
- an optional component number used as offset when counting linesList<String> getLines()
List<String> getLines(int offset)
offset
- an optional component number used as offset when counting linesList<String> getLinesBetween(int start, int end)
start
- a reference to a specific line in the field, first line being 1end
- a reference to a specific line in the field, must be greater than startgetLinesBetween(int, int, int)
List<String> getLinesBetween(int start, int end, int offset)
start
- a reference to a specific line in the field, first line being 1end
- a reference to a specific line in the field, must be greater than startoffset
- an optional component number used as offset when counting lines