net.i2p.router.sybil

## Class Points

- java.lang.Object
- - net.i2p.router.sybil.Points

- All Implemented Interfaces:
    Comparable<Points>

      public class Points
      extends Object
      implements Comparable<Points>

  A total score and a List of reason Strings

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Points(double d, String reason)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPoints(double d, String reason)`
    `int` | `compareTo(Points r)`
    `static Points` | `fromString(String s)` For persistence.
    `double` | `getPoints()`
    `List<String>` | `getReasons()`
    `String` | `toString()`
    `void` | `toString(StringBuilder buf)` For persistence.

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

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

- - ### Constructor Detail

    - #### Points

          public Points(double d,
                        String reason)

      Parameters:
        `reason` - may not contain '%'

  - ### Method Detail

    - #### addPoints

          public void addPoints(double d,
                                String reason)

      Parameters:
        `reason` - may not contain '%'

    - #### compareTo

          public int compareTo(Points r)

      Specified by:
        `compareTo` in interface `Comparable<Points>`

    - #### fromString

          public static Points fromString(String s)

      For persistence.
      Returns:
        null on failure

    - #### getPoints

          public double getPoints()

    - #### getReasons

          public List<String> getReasons()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public void toString(StringBuilder buf)

      For persistence. Total points and reasons, '%' separated, no newline. The separation character is chosen to not conflict with decimal point in various locales, or chars in reasons, including HTML links, or special chars in Pattern.