net.sf.jasperreports.crosstabs.fill

## Class JRPercentageCalculatorFactory

- java.lang.Object
- - net.sf.jasperreports.crosstabs.fill.JRPercentageCalculatorFactory

-     public final class JRPercentageCalculatorFactory
      extends java.lang.Object

  Factory for percentage calculators.
  Version:
    $Id: JRPercentageCalculatorFactory.java 5877 2013-01-07 19:51:14Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JRPercentageCalculatorFactory.BigDecimalPercentageCalculator` Percentage calculator for `BigDecimal` values.
    `static class` | `JRPercentageCalculatorFactory.BigIntegerPercentageCalculator` Percentage calculator for `BigInteger` values.
    `static class` | `JRPercentageCalculatorFactory.BytePercentageCalculator` Percentage calculator for `Byte` values.
    `static class` | `JRPercentageCalculatorFactory.DoublePercentageCalculator` Percentage calculator for `Double` values.
    `static class` | `JRPercentageCalculatorFactory.FloatPercentageCalculator` Percentage calculator for `Float` values.
    `static class` | `JRPercentageCalculatorFactory.IntegerPercentageCalculator` Percentage calculator for `Integer` values.
    `static class` | `JRPercentageCalculatorFactory.LongPercentageCalculator` Percentage calculator for `Long` values.
    `static class` | `JRPercentageCalculatorFactory.ShortPercentageCalculator` Percentage calculator for `Short` values.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JRPercentageCalculator` | `getPercentageCalculator(java.lang.Class<?> percentageCalculatorClass, java.lang.Class<?> valueClass)` Returns a percentage calculator.
    `static boolean` | `hasBuiltInCalculator(java.lang.Class<?> valueClass)` Checks whether a class has built-in percentage support.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### hasBuiltInCalculator

          public static boolean hasBuiltInCalculator(java.lang.Class<?> valueClass)

      Checks whether a class has built-in percentage support.
      Parameters:
        `valueClass` - the class
      Returns:
        whether the class has built-in percentage support

    - #### getPercentageCalculator

          public static JRPercentageCalculator getPercentageCalculator(java.lang.Class<?> percentageCalculatorClass,
                                                       java.lang.Class<?> valueClass)

      Returns a percentage calculator.

      If the percentage calculator class is not null, it will be used to instantiate a percentage calculator. Otherwise, a built-in percentage calculator will be returned based on the value class.

      Parameters:
        `percentageCalculatorClass` - the percentage calculator class
        `valueClass` - the value class
      Returns:
        a percentage calculator for the percentage calculator class/value class

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com