Interface Oid


  • public interface Oid
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static int _escOid​(int v)  
      static int[] getRandomInts​(int length)
      The function used to generate a list of random integers to construct OID.
      static boolean isValidOid​(java.lang.String value)  
      static java.lang.String mergeOid​(java.lang.String oid1, java.lang.String oid2)
      Creates a new OID based two OIDs.
      static java.lang.String nextOid()
      Returns the next unique object ID.
    • Method Detail

      • nextOid

        static java.lang.String nextOid()
        Returns the next unique object ID.
      • mergeOid

        static java.lang.String mergeOid​(java.lang.String oid1,
                                         java.lang.String oid2)
        Creates a new OID based two OIDs.

        > To shorten the result OID, we retrieve the substring of [oid1] and [oid2] and concatenate them together. Of course, there might be conflict but the chance is so low that we can ignore (like OID generator),

      • isValidOid

        static boolean isValidOid​(java.lang.String value)
      • getRandomInts

        static int[] getRandomInts​(int length)
        The function used to generate a list of random integers to construct OID.

        The default implementation uses [Random] to generate the random number. When running at the browser, it is better to replace with `Crypto.getRandomValues`.

      • _escOid

        static int _escOid​(int v)