Top Description Fields Constructors Methods
de.undercouch.citeproc.csl

public Class CitationIDIndexPair

extends Object
implements JsonObject
Class Inheritance
All Implemented Interfaces
de.undercouch.citeproc.helper.json.JsonObject
Imports
de.undercouch.citeproc.helper.json.JsonBuilder, .JsonObject, java.util.List

A pair containing a CSLCitation's citation ID and an note index from a CSLCitation's CSLProperties
Author
Michel Kraemer

Field Summary

Modifier and TypeField and Description
private final String
private final int

Constructor Summary

AccessConstructor and Description
public
CitationIDIndexPair(String
the citation ID
citationId
,
int
the index
noteIndex
)

Constructs a new pair

public
CitationIDIndexPair(CSLCitation
the citation object
citation
)

Constructs a new pair with the values from the given citation object

Method Summary

Modifier and TypeMethod and Description
public static CitationIDIndexPair

Returns:

the converted CitationIDIndexPair object
fromJson
(List<?>
the JSON array to convert
arr
)

Converts a JSON array to a CitationIDIndexPair object.

public String

Returns:

the citation ID
getCitationId
()

public int

Returns:

the note index
getNoteIndex
()

public Object
toJson(JsonBuilder builder)

Implements de.undercouch.citeproc.helper.json.JsonObject.toJson.

Converts this object to a JSON object

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

citationIdback to summary
private final String citationId
noteIndexback to summary
private final int noteIndex

Constructor Detail

CitationIDIndexPairback to summary
public CitationIDIndexPair(String citationId, int noteIndex)

Constructs a new pair

Parameters
citationId:String

the citation ID

noteIndex:int

the index

CitationIDIndexPairback to summary
public CitationIDIndexPair(CSLCitation citation)

Constructs a new pair with the values from the given citation object

Parameters
citation:CSLCitation

the citation object

Method Detail

fromJsonback to summary
public static CitationIDIndexPair fromJson(List<?> arr)

Converts a JSON array to a CitationIDIndexPair object.

Parameters
arr:List<?>

the JSON array to convert

Returns:CitationIDIndexPair

the converted CitationIDIndexPair object

getCitationIdback to summary
public String getCitationId()
Returns:String

the citation ID

getNoteIndexback to summary
public int getNoteIndex()
Returns:int

the note index

toJsonback to summary
public Object toJson(JsonBuilder builder)

Implements de.undercouch.citeproc.helper.json.JsonObject.toJson.

Doc from de.undercouch.citeproc.helper.json.JsonObject.toJson.

Converts this object to a JSON object

Annotations
@Override