Package io.keikai.doc.collab.utils
Class ID
- java.lang.Object
-
- io.keikai.doc.collab.utils.ID
-
public class ID extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ID(int client, int clock)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancompareIDs(ID a, ID b)Compare IDsstatic IDcreateID(int client, int clock)static java.lang.StringfindRootTypeKey(AbstractType type)The top types are mapped from y.share.get(keyname) => type.intgetClient()intgetClock()static IDreadID(Decoder decoder)voidsetClient(int client)voidsetClock(int clock)static voidwriteID(Encoder encoder, ID id)
-
-
-
Method Detail
-
getClient
public int getClient()
-
setClient
public void setClient(int client)
-
getClock
public int getClock()
-
setClock
public void setClock(int clock)
-
compareIDs
public static boolean compareIDs(ID a, ID b)
Compare IDs- Parameters:
a- might be nullb- might be null- Returns:
-
createID
public static ID createID(int client, int clock)
-
findRootTypeKey
public static java.lang.String findRootTypeKey(AbstractType type)
The top types are mapped from y.share.get(keyname) => type. `type` does not store any information about the `keyname`. This function finds the correct `keyname` for `type` and throws otherwise.- Parameters:
type- Internal used only.
-
-