Class NumberOfPagesStatisticsAggregator
- java.lang.Object
-
- com.itextpdf.commons.actions.AbstractStatisticsAggregator
-
- com.itextpdf.kernel.pdf.statistics.NumberOfPagesStatisticsAggregator
-
public class NumberOfPagesStatisticsAggregator extends AbstractStatisticsAggregator
Statistics aggregator which aggregates number of pages in PDF documents.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
HUNDRED
private java.lang.Object
lock
private java.util.Map<java.lang.String,java.lang.Long>
numberOfDocuments
private static java.util.Map<java.lang.Integer,java.lang.String>
NUMBERS_OF_PAGES
private static int
ONE
private static java.util.List<java.lang.Integer>
SORTED_UPPER_BOUNDS_OF_PAGES
private static java.lang.String
STRING_FOR_HUNDRED_PAGES
private static java.lang.String
STRING_FOR_INF
private static java.lang.String
STRING_FOR_ONE_PAGE
private static java.lang.String
STRING_FOR_TEN_PAGES
private static java.lang.String
STRING_FOR_THOUSAND_PAGES
private static int
TEN
private static int
THOUSAND
-
Constructor Summary
Constructors Constructor Description NumberOfPagesStatisticsAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aggregate(AbstractStatisticsEvent event)
Aggregates number of pages from the provided event.void
merge(AbstractStatisticsAggregator aggregator)
Merges data about amounts of ranges of pages from the provided aggregator into this aggregator.java.lang.Object
retrieveAggregation()
Retrieves Map where keys are ranges of pages and values are the amounts of such PDF documents.
-
-
-
Field Detail
-
ONE
private static final int ONE
- See Also:
- Constant Field Values
-
TEN
private static final int TEN
- See Also:
- Constant Field Values
-
HUNDRED
private static final int HUNDRED
- See Also:
- Constant Field Values
-
THOUSAND
private static final int THOUSAND
- See Also:
- Constant Field Values
-
STRING_FOR_ONE_PAGE
private static final java.lang.String STRING_FOR_ONE_PAGE
- See Also:
- Constant Field Values
-
STRING_FOR_TEN_PAGES
private static final java.lang.String STRING_FOR_TEN_PAGES
- See Also:
- Constant Field Values
-
STRING_FOR_HUNDRED_PAGES
private static final java.lang.String STRING_FOR_HUNDRED_PAGES
- See Also:
- Constant Field Values
-
STRING_FOR_THOUSAND_PAGES
private static final java.lang.String STRING_FOR_THOUSAND_PAGES
- See Also:
- Constant Field Values
-
STRING_FOR_INF
private static final java.lang.String STRING_FOR_INF
- See Also:
- Constant Field Values
-
NUMBERS_OF_PAGES
private static final java.util.Map<java.lang.Integer,java.lang.String> NUMBERS_OF_PAGES
-
SORTED_UPPER_BOUNDS_OF_PAGES
private static final java.util.List<java.lang.Integer> SORTED_UPPER_BOUNDS_OF_PAGES
-
lock
private final java.lang.Object lock
-
numberOfDocuments
private final java.util.Map<java.lang.String,java.lang.Long> numberOfDocuments
-
-
Method Detail
-
aggregate
public void aggregate(AbstractStatisticsEvent event)
Aggregates number of pages from the provided event.- Specified by:
aggregate
in classAbstractStatisticsAggregator
- Parameters:
event
-NumberOfPagesStatisticsEvent
instance
-
retrieveAggregation
public java.lang.Object retrieveAggregation()
Retrieves Map where keys are ranges of pages and values are the amounts of such PDF documents.- Specified by:
retrieveAggregation
in classAbstractStatisticsAggregator
- Returns:
- aggregated
Map
-
merge
public void merge(AbstractStatisticsAggregator aggregator)
Merges data about amounts of ranges of pages from the provided aggregator into this aggregator.- Specified by:
merge
in classAbstractStatisticsAggregator
- Parameters:
aggregator
-NumberOfPagesStatisticsAggregator
from which data will be taken.
-
-