net.i2p.stat

## Class PersistenceHelper

- java.lang.Object
- - net.i2p.stat.PersistenceHelper

-     class PersistenceHelper
      extends Object

  Output rate data. This is used via ProfilePersistenceHelper and the output must be compatible.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PersistenceHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `add(StringBuilder buf, boolean addComments, String prefix, String name, String description, double value)`
    `static void` | `add(StringBuilder buf, boolean addComments, String prefix, String name, String description, long value)`
    `static void` | `addDate(StringBuilder buf, boolean addComments, String prefix, String name, String description, long value)`
    `static void` | `addTime(StringBuilder buf, boolean addComments, String prefix, String name, String description, long value)`
    `static double` | `getDouble(Properties props, String prefix, String name)`
    `static int` | `getInt(Properties props, String prefix, String name)`
    `static long` | `getLong(Properties props, String prefix, String name)`

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

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

- - ### Constructor Detail

    - #### PersistenceHelper

          PersistenceHelper()

  - ### Method Detail

    - #### add

          public static final void add(StringBuilder buf,
                                       boolean addComments,
                                       String prefix,
                                       String name,
                                       String description,
                                       double value)

    - #### add

          public static final void add(StringBuilder buf,
                                       boolean addComments,
                                       String prefix,
                                       String name,
                                       String description,
                                       long value)

      Parameters:
        `value` - non-negative

    - #### addDate

          public static final void addDate(StringBuilder buf,
                                           boolean addComments,
                                           String prefix,
                                           String name,
                                           String description,
                                           long value)

    - #### addTime

          public static final void addTime(StringBuilder buf,
                                           boolean addComments,
                                           String prefix,
                                           String name,
                                           String description,
                                           long value)

    - #### getDouble

          public static final double getDouble(Properties props,
                                               String prefix,
                                               String name)

      Returns:
        0 on error

    - #### getInt

          public static final int getInt(Properties props,
                                         String prefix,
                                         String name)

      Returns:
        non-negative, returns 0 on error

    - #### getLong

          public static final long getLong(Properties props,
                                           String prefix,
                                           String name)

      Returns:
        non-negative, returns 0 on error