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 intHUNDREDprivate java.lang.Objectlockprivate java.util.Map<java.lang.String,java.lang.Long>numberOfDocumentsprivate static java.util.Map<java.lang.Integer,java.lang.String>NUMBERS_OF_PAGESprivate static intONEprivate static java.util.List<java.lang.Integer>SORTED_UPPER_BOUNDS_OF_PAGESprivate static java.lang.StringSTRING_FOR_HUNDRED_PAGESprivate static java.lang.StringSTRING_FOR_INFprivate static java.lang.StringSTRING_FOR_ONE_PAGEprivate static java.lang.StringSTRING_FOR_TEN_PAGESprivate static java.lang.StringSTRING_FOR_THOUSAND_PAGESprivate static intTENprivate static intTHOUSAND
-
Constructor Summary
Constructors Constructor Description NumberOfPagesStatisticsAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaggregate(AbstractStatisticsEvent event)Aggregates number of pages from the provided event.voidmerge(AbstractStatisticsAggregator aggregator)Merges data about amounts of ranges of pages from the provided aggregator into this aggregator.java.lang.ObjectretrieveAggregation()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:
aggregatein classAbstractStatisticsAggregator- Parameters:
event-NumberOfPagesStatisticsEventinstance
-
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:
retrieveAggregationin 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:
mergein classAbstractStatisticsAggregator- Parameters:
aggregator-NumberOfPagesStatisticsAggregatorfrom which data will be taken.
-
-