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

public Class PageRanges

extends AbstractList<PageRange>
Class Inheritance
Imports
org.apache.commons.lang3.StringUtils, java.util.AbstractList, .ArrayList, .List, java.util.stream.Collectors

A list of PageRanges
Author
Michel Kraemer

Field Summary

Modifier and TypeField and Description
private final List<PageRange>
Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
public
PageRanges()

Construct an empty list of page ranges

public
PageRanges(PageRange
the page range
singleRange
)

Construct a list containing a single page range

Method Summary

Modifier and TypeMethod and Description
public boolean
add(PageRange pageRange)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list (optional operation).

public PageRange
get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.

public String

Returns:

the literal representation of this list of page ranges
getLiteral
()

public Integer

Returns:

the sum of the number of pages of all page ranges in this list or null if the page ranges were unparsable and the sum could not be determined
getNumberOfPages
()

public String

Returns:

the first page of all page ranges in this list
getPageFirst
()

public boolean

Returns:

true if the page ranges in this list represent multiple pages
isMultiplePages
()

public PageRange
remove(int index)

Overrides java.util.AbstractList.remove.

Implements java.util.List.remove.

Removes the element at the specified position in this list (optional operation).

public PageRange
set(int index, PageRange element)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.

Inherited from java.util.AbstractList:
addaddAllclearequalshashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorremoveRangesubList

Field Detail

listback to summary
private final List<PageRange> list

Constructor Detail

PageRangesback to summary
public PageRanges()

Construct an empty list of page ranges

PageRangesback to summary
public PageRanges(PageRange singleRange)

Construct a list containing a single page range

Parameters
singleRange:PageRange

the page range

Method Detail

addback to summary
public boolean add(PageRange pageRange)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.AbstractList.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Annotations
@Override
getback to summary
public PageRange get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.AbstractList.get.

Returns the element at the specified position in this list.

Annotations
@Override
getLiteralback to summary
public String getLiteral()
Returns:String

the literal representation of this list of page ranges

getNumberOfPagesback to summary
public Integer getNumberOfPages()
Returns:Integer

the sum of the number of pages of all page ranges in this list or null if the page ranges were unparsable and the sum could not be determined

getPageFirstback to summary
public String getPageFirst()
Returns:String

the first page of all page ranges in this list

isMultiplePagesback to summary
public boolean isMultiplePages()
Returns:boolean

true if the page ranges in this list represent multiple pages

removeback to summary
public PageRange remove(int index)

Overrides java.util.AbstractList.remove.

Implements java.util.List.remove.

Doc from java.util.AbstractList.remove.

Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Annotations
@Override
setback to summary
public PageRange set(int index, PageRange element)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Doc from java.util.AbstractList.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Annotations
@Override