Top Fields Constructors Methods
org.jabref.model.texparser

public final Record Citation

extends Record
Class Inheritance
Record Components
path:Path 
line:int 
colStart:int 
colEnd:int 
lineText:String 
Imports
java.nio.file.Path, java.util.Objects

Field Summary

Modifier and TypeField and Description
private final int
colEnd

Record Component accessed by colEnd().

private final int
colStart

Record Component accessed by colStart().

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().

private final String
lineText

Record Component accessed by lineText().

private final Path
path

Record Component accessed by path().

Constructor Summary

AccessConstructor and Description
public
Citation(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.

public int
colStart()

Record Component getter of colStart.

public final boolean
equals(Object
the reference object with which to compare.
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.

public String
lineText()

Record Component getter of lineText.

public Path
path()

Record Component getter of path.

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().

colStartback to summary
private final int colStart

Record Component accessed by colStart().

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().

lineTextback to summary
private final String lineText

Record Component accessed by lineText().

pathback to summary
private final Path path

Record Component accessed by path().

Constructor Detail

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

Method Detail

colEndback to summary
public int colEnd()

Record Component getter of colEnd.

colStartback to summary
public int colStart()

Record Component getter of colStart.

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).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

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.

Returns:int

a hash code value for this record.

lineback to summary
public int line()

Record Component getter of line.

lineTextback to summary
public String lineText()

Record Component getter of lineText.

pathback to summary
public Path path()

Record Component getter of path.

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.

Returns:String

a string representation of the object.

Annotations
@Override