Package 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- Since:
- 0.9.38 moved from SybilRenderer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
Points
public Points(double d, String reason)
- Parameters:
reason
- may not contain '%'
-
-
Method Detail
-
getPoints
public double getPoints()
- Since:
- 0.9.38
-
addPoints
public void addPoints(double d, String reason)
- Parameters:
reason
- may not contain '%'- Since:
- 0.9.38
-
compareTo
public int compareTo(Points r)
- Specified by:
compareTo
in interfaceComparable<Points>
-
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
-
-