Class Points

  • All Implemented Interfaces:
    Comparable<Points>

    public class Points
    extends Object
    implements Comparable<Points>
    A total score and a List of reason Strings
    Since:
    0.9.38 moved from SybilRenderer
    • Constructor Detail

      • Points

        public Points​(double d,
                      String reason)
        Parameters:
        reason - may not contain '%'
    • Method Detail

      • getPoints

        public double getPoints()
        Since:
        0.9.38
      • getReasons

        public List<String> getReasons()
        Since:
        0.9.38
      • addPoints

        public void addPoints​(double d,
                              String reason)
        Parameters:
        reason - may not contain '%'
        Since:
        0.9.38
      • 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.
        Since:
        0.9.38
      • fromString

        public static Points fromString​(String s)
        For persistence.
        Returns:
        null on failure
        Since:
        0.9.38