Interface MultiLineField
-
- All Known Implementing Classes:
Field11R
,Field11S
,Field11T
,Field130
,Field134
,Field23R
,Field24G
,Field25P
,Field26D
,Field29A
,Field29B
,Field29D
,Field29F
,Field35B
,Field35E
,Field35G
,Field35L
,Field37N
,Field39C
,Field39D
,Field39E
,Field39F
,Field40B
,Field41A
,Field41D
,Field41G
,Field42A
,Field42C
,Field42D
,Field42M
,Field42P
,Field44D
,Field44J
,Field45A
,Field45B
,Field45C
,Field45D
,Field45L
,Field46A
,Field46B
,Field47A
,Field47B
,Field47E
,Field49A
,Field49F
,Field49G
,Field49H
,Field49J
,Field49K
,Field49L
,Field49M
,Field49N
,Field49Z
,Field50
,Field50A
,Field50B
,Field50D
,Field50F
,Field50G
,Field50H
,Field50K
,Field51
,Field51A
,Field51D
,Field52A
,Field52B
,Field52D
,Field53A
,Field53B
,Field53D
,Field54A
,Field54B
,Field54D
,Field55A
,Field55B
,Field55D
,Field56A
,Field56B
,Field56D
,Field57A
,Field57B
,Field57D
,Field58A
,Field58B
,Field58D
,Field59
,Field59A
,Field59F
,Field61
,Field70
,Field70C
,Field70D
,Field70E
,Field70F
,Field70G
,Field71B
,Field71C
,Field71D
,Field71E
,Field71N
,Field72
,Field72Z
,Field73
,Field73A
,Field74
,Field75
,Field76
,Field77
,Field77A
,Field77B
,Field77C
,Field77D
,Field77E
,Field77F
,Field77J
,Field77L
,Field77T
,Field77U
,Field78
,Field78B
,Field78D
,Field79
,Field79Z
,Field80C
,Field81A
,Field81D
,Field82A
,Field82B
,Field82D
,Field83A
,Field83D
,Field84A
,Field84B
,Field84D
,Field85A
,Field85B
,Field85D
,Field86
,Field86A
,Field86B
,Field86D
,Field87A
,Field87B
,Field87D
,Field88A
,Field88B
,Field88D
,Field89A
,Field89D
,Field91A
,Field91D
,Field94E
,Field94G
,Field95Q
,Field95U
,Field95V
,Field96A
,Field96D
public interface MultiLineField
Interface to mark fields whose structure admits multiple lines and API to query the field lines.- Since:
- 7.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getLine(int line)
Returns a specific line from the field's value.java.lang.String
getLine(int line, int offset)
Returns a specific line from the field's value.java.util.List<java.lang.String>
getLines()
Returns the field value split into lines.java.util.List<java.lang.String>
getLines(int offset)
Returns the field value starting at the offset component, split into lines.java.util.List<java.lang.String>
getLinesBetween(int start, int end)
Returns a specific subset of lines from the field's value, given a range.java.util.List<java.lang.String>
getLinesBetween(int start, int end, int offset)
Returns a specific subset of lines from the field's value, starting at the offset component.
-
-
-
Method Detail
-
getLine
java.lang.String getLine(int line)
Returns a specific line from the field's value.- Parameters:
line
- a reference to a specific line in the field, first line being 1- Returns:
- line content or null if not present or if line number is above the expected
- Since:
- 7.7
- See Also:
getLine(int, int)
-
getLine
java.lang.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. If the line for example starts with a slash character it will be removed. This is to avoid meaningless separators for components that are being skipped because of the offset parameter.
- Parameters:
line
- a reference to a specific line in the field, first line being 1offset
- an optional component number used as offset when counting lines- Returns:
- line content or null if not present, if line number is above the expected or if the offset is invalid
- Since:
- 7.7
-
getLines
java.util.List<java.lang.String> getLines()
Returns the field value split into lines.- Returns:
- found lines or empty list if value is empty
- Since:
- 7.7
-
getLines
java.util.List<java.lang.String> getLines(int offset)
Returns the field value starting at the offset component, split into lines.- Parameters:
offset
- an optional component number used as offset when counting lines- Returns:
- found lines or empty list if lines are not present or the offset is invalid
- Since:
- 7.7
-
getLinesBetween
java.util.List<java.lang.String> getLinesBetween(int start, int end)
Returns a specific subset of lines from the field's value, given a range.- Parameters:
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 start- Returns:
- found lines or empty list if value is empty
- Since:
- 7.7
- See Also:
getLinesBetween(int, int, int)
-
getLinesBetween
java.util.List<java.lang.String> getLinesBetween(int start, int end, int offset)
Returns a specific subset of lines from the field's value, starting at the offset component.- Parameters:
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- Returns:
- found lines or empty list if lines are not present or the offset is invalid
- Since:
- 7.7
-
-