Verified Owner
Top Fields Constructors Methods
org.jabref.model.texparser

public final Record Citation

extends Record
Class Inheritance
Record Components
path:Path
the path to the file containing the citationkey
line:int
the line number of the citationkey (starting at 1)
colStart:int
the column number of the start of the citation key (starting at 0)
colEnd:int
the column number of the end of the citation key (starting at 0)
lineText:String
the text of the line containing the citationkey
Imports
java.nio.file.Path, org.jspecify.annotations.NonNull

Field Summary

Modifier and TypeField and Description
private final int
colEnd

Record Component accessed by colEnd().

the column number of the end of the citation key (starting at 0)
private final int
colStart

Record Component accessed by colStart().

the column number of the start of the citation key (starting at 0)
private static final int
CONTEXT_WIDTH

The total number of characters that are shown around a cite (cite width included).

private final int
line

Record Component accessed by line().

the line number of the citationkey (starting at 1)
private final String
lineText

Record Component accessed by lineText().

the text of the line containing the citationkey
private final Path
path

Record Component accessed by path().

the path to the file containing the citationkey

Constructor Summary

AccessConstructor and Description
public
Citation(@NonNull Path path, int line, int colStart, int colEnd, String lineText)

Method Summary

Modifier and TypeMethod and Description
public int
colEnd()

Record Component getter of colEnd.

Record Component the column number of the end of the citation key (starting at 0)

public int
colStart()

Record Component getter of colStart.

Record Component the column number of the start of the citation key (starting at 0)

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public String
getContext()

Get a fixed-width string that contains a cite and the text that surrounds it along the same line.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public int
line()

Record Component getter of line.

Record Component the line number of the citationkey (starting at 1)

public String
lineText()

Record Component getter of lineText.

Record Component the text of the line containing the citationkey

public Path
path()

Record Component getter of path.

Record Component the path to the file containing the citationkey

public String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

colEndback to summary
private final int colEnd

Record Component accessed by colEnd().

the column number of the end of the citation key (starting at 0)

colStartback to summary
private final int colStart

Record Component accessed by colStart().

the column number of the start of the citation key (starting at 0)

CONTEXT_WIDTHback to summary
private static final int CONTEXT_WIDTH

The total number of characters that are shown around a cite (cite width included).

lineback to summary
private final int line

Record Component accessed by line().

the line number of the citationkey (starting at 1)

lineTextback to summary
private final String lineText

Record Component accessed by lineText().

the text of the line containing the citationkey

pathback to summary
private final Path path

Record Component accessed by path().

the path to the file containing the citationkey

Constructor Detail

Citationback to summary
public Citation(@NonNull Path path, int line, int colStart, int colEnd, String lineText)

Method Detail

colEndback to summary
public int colEnd()

Record Component getter of colEnd.

Record Component
the column number of the end of the citation key (starting at 0)
colStartback to summary
public int colStart()

Record Component getter of colStart.

Record Component
the column number of the start of the citation key (starting at 0)
equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
getContextback to summary
public String getContext()

Get a fixed-width string that contains a cite and the text that surrounds it along the same line.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

lineback to summary
public int line()

Record Component getter of line.

Record Component
the line number of the citationkey (starting at 1)
lineTextback to summary
public String lineText()

Record Component getter of lineText.

Record Component
the text of the line containing the citationkey
pathback to summary
public Path path()

Record Component getter of path.

Record Component
the path to the file containing the citationkey
toStringback to summary
public String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Annotations
@Override