Package org.drasyl.handler.dht.chord
Class ChordUtil
java.lang.Object
org.drasyl.handler.dht.chord.ChordUtil
Utility class for Chord-related operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longstatic StringchordIdHex(long id) static StringchordIdHex(Object o) static StringchordIdPosition(long id) static Stringstatic longithFingerStart(long baseId, int i) Returns the start id for theith finger.static longithFingerStart(Object o, int i) static longrelativeChordId(long aId, long bId) static longrelativeChordId(long a, Object b) static longrelativeChordId(Object a, long b) static longrelativeChordId(Object a, Object b)
-
Method Details
-
chordId
-
chordIdHex
-
chordIdHex
-
chordIdPosition
-
chordIdPosition
-
ithFingerStart
public static long ithFingerStart(long baseId, int i) Returns the start id for theith finger.- Parameters:
i- between 1 and 32
-
ithFingerStart
-
relativeChordId
public static long relativeChordId(long aId, long bId) -
relativeChordId
-
relativeChordId
-
relativeChordId
-