Package de.undercouch.citeproc.bibtex
Class PageRanges
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<PageRange>
-
- de.undercouch.citeproc.bibtex.PageRanges
-
-
Constructor Summary
Constructors Constructor Description PageRanges()Construct an empty list of page rangesPageRanges(PageRange singleRange)Construct a list containing a single page range
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(PageRange pageRange)PageRangeget(int index)java.lang.StringgetLiteral()java.lang.IntegergetNumberOfPages()java.lang.StringgetPageFirst()booleanisMultiplePages()PageRangeremove(int index)PageRangeset(int index, PageRange element)intsize()-
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
PageRanges
public PageRanges()
Construct an empty list of page ranges
-
PageRanges
public PageRanges(PageRange singleRange)
Construct a list containing a single page range- Parameters:
singleRange- the page range
-
-
Method Detail
-
size
public int size()
-
get
public PageRange get(int index)
-
add
public boolean add(PageRange pageRange)
-
remove
public PageRange remove(int index)
-
getLiteral
public java.lang.String getLiteral()
- Returns:
- the literal representation of this list of page ranges
-
getPageFirst
public java.lang.String getPageFirst()
- Returns:
- the first page of all page ranges in this list
-
getNumberOfPages
public java.lang.Integer getNumberOfPages()
- Returns:
- the sum of the number of pages of all page ranges in this list
or
nullif the page ranges were unparsable and the sum could not be determined
-
isMultiplePages
public boolean isMultiplePages()
- Returns:
trueif the page ranges in this list represent multiple pages
-
-