Package de.undercouch.citeproc.csl
Class CitationIDIndexPair
- java.lang.Object
-
- de.undercouch.citeproc.csl.CitationIDIndexPair
-
- All Implemented Interfaces:
JsonObject
public class CitationIDIndexPair extends java.lang.Object implements JsonObject
- Author:
- Michel Kraemer
-
-
Constructor Summary
Constructors Constructor Description CitationIDIndexPair(CSLCitation citation)Constructs a new pair with the values from the given citation objectCitationIDIndexPair(java.lang.String citationId, int noteIndex)Constructs a new pair
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CitationIDIndexPairfromJson(java.util.List<?> arr)Converts a JSON array to a CitationIDIndexPair object.java.lang.StringgetCitationId()intgetNoteIndex()java.lang.ObjecttoJson(JsonBuilder builder)Converts this object to a JSON object
-
-
-
Constructor Detail
-
CitationIDIndexPair
public CitationIDIndexPair(java.lang.String citationId, int noteIndex)Constructs a new pair- Parameters:
citationId- the citation IDnoteIndex- the index
-
CitationIDIndexPair
public CitationIDIndexPair(CSLCitation citation)
Constructs a new pair with the values from the given citation object- Parameters:
citation- the citation object
-
-
Method Detail
-
getCitationId
public java.lang.String getCitationId()
- Returns:
- the citation ID
-
getNoteIndex
public int getNoteIndex()
- Returns:
- the note index
-
toJson
public java.lang.Object toJson(JsonBuilder builder)
Description copied from interface:JsonObjectConverts this object to a JSON object- Specified by:
toJsonin interfaceJsonObject- Parameters:
builder- a builder that can be used to perform the conversion- Returns:
- the JSON object
-
fromJson
public static CitationIDIndexPair fromJson(java.util.List<?> arr)
Converts a JSON array to a CitationIDIndexPair object.- Parameters:
arr- the JSON array to convert- Returns:
- the converted CitationIDIndexPair object
-
-