Class ChordUtil

java.lang.Object
org.drasyl.handler.dht.chord.ChordUtil

public final class ChordUtil extends Object
Utility class for Chord-related operations.
  • Method Details

    • chordId

      public static long chordId(Object o)
    • chordIdHex

      public static String chordIdHex(long id)
    • chordIdHex

      public static String chordIdHex(Object o)
    • chordIdPosition

      public static String chordIdPosition(long id)
    • chordIdPosition

      public static String chordIdPosition(Object o)
    • ithFingerStart

      public static long ithFingerStart(long baseId, int i)
      Returns the start id for the ith finger.
      Parameters:
      i - between 1 and 32
    • ithFingerStart

      public static long ithFingerStart(Object o, int i)
    • relativeChordId

      public static long relativeChordId(long aId, long bId)
    • relativeChordId

      public static long relativeChordId(long a, Object b)
    • relativeChordId

      public static long relativeChordId(Object a, long b)
    • relativeChordId

      public static long relativeChordId(Object a, Object b)