Package org.plumelib.util
Class EntryReader.Entry
java.lang.Object
org.plumelib.util.EntryReader.Entry
- Enclosing class:
- EntryReader
Descriptor for an entry (record, paragraph, etc.).
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringComplete body of the entry including the first line.final StringFilename in which the entry was found.final StringFirst line of the entry.final longLine number of first line of entry.final booleanTrue if this is a short entry (blank-line-separated). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDescription(@Nullable Pattern re) Returns a substring of the entry body that matches the specified regular expression.
-
Field Details
-
firstLine
First line of the entry. -
body
Complete body of the entry including the first line. -
shortEntry
public final boolean shortEntryTrue if this is a short entry (blank-line-separated). -
filename
Filename in which the entry was found. -
lineNumber
public final long lineNumberLine number of first line of entry.
-
-
Constructor Details
-
Entry
Create an entry.- Parameters:
firstLine- first line of the entrybody- complete body of the entry including the first lineshortEntry- true if this is a short entry (blank-line-separated)filename- filename in which the entry was foundlineNumber- line number of first line of entry
-
-
Method Details
-
getDescription
Returns a substring of the entry body that matches the specified regular expression. If no match is found, returnsfirstLine.- Parameters:
re- regex to match- Returns:
- a substring that matches re
-