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 long
static String
chordIdHex
(long id) static String
chordIdHex
(Object o) static String
chordIdPosition
(long id) static String
static long
ithFingerStart
(long baseId, int i) Returns the start id for thei
th finger.static long
ithFingerStart
(Object o, int i) static long
relativeChordId
(long aId, long bId) static long
relativeChordId
(long a, Object b) static long
relativeChordId
(Object a, long b) static long
relativeChordId
(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 thei
th finger.- Parameters:
i
- between 1 and 32
-
ithFingerStart
-
relativeChordId
public static long relativeChordId(long aId, long bId) -
relativeChordId
-
relativeChordId
-
relativeChordId
-