Package io.keikai.util
Interface Oid
-
public interface Oid
-
-
Field Summary
Fields Modifier and Type Field Description static int
_CC_0
static int
_CC_a
static int
_CC_A
static int[]
_CC_EXTRA
static int
_CC_RANGE
static int
_CHAR_PER_INT
static int
_INT_LEN
static Pattern
_oidPattern
static Random
_random
static int
OID_LENGTH
-
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(String value)
static String
mergeOid(String oid1, String oid2)
Creates a new OID based two OIDs.static String
nextOid()
Returns the next unique object ID.
-
-
-
Field Detail
-
OID_LENGTH
static final int OID_LENGTH
- See Also:
- Constant Field Values
-
_CC_EXTRA
static final int[] _CC_EXTRA
-
_CC_RANGE
static final int _CC_RANGE
- See Also:
- Constant Field Values
-
_CC_0
static final int _CC_0
- See Also:
- Constant Field Values
-
_CC_A
static final int _CC_A
- See Also:
- Constant Field Values
-
_CC_a
static final int _CC_a
- See Also:
- Constant Field Values
-
_INT_LEN
static final int _INT_LEN
- See Also:
- Constant Field Values
-
_CHAR_PER_INT
static final int _CHAR_PER_INT
- See Also:
- Constant Field Values
-
_oidPattern
static final Pattern _oidPattern
-
_random
static final Random _random
-
-
Method Detail
-
nextOid
static String nextOid()
Returns the next unique object ID.
-
mergeOid
static String mergeOid(String oid1, 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(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)
-
-