Tabnine Logo
ULID.nextValue
Code IndexAdd Tabnine to your IDE (free)

How to use
nextValue
method
in
de.huxhorn.sulky.ulid.ULID

Best Java code snippets using de.huxhorn.sulky.ulid.ULID.nextValue (Showing top 4 results out of 315)

origin: huxi/sulky

public Value nextValue()
{
  return nextValue(System.currentTimeMillis());
}
origin: de.huxhorn.sulky/de.huxhorn.sulky.ulid

public Value nextValue()
{
  return nextValue(System.currentTimeMillis());
}
origin: de.huxhorn.sulky/de.huxhorn.sulky.ulid

/**
 * Returns the next monotonic value. If an overflow happened while incrementing
 * the random part of the given previous ULID value then the returned value will
 * have a zero random part.
 *
 * @param previousUlid the previous ULID value.
 * @param timestamp the timestamp of the next ULID value.
 * @return the next monotonic value.
 */
public Value nextMonotonicValue(Value previousUlid, long timestamp)
{
  Objects.requireNonNull(previousUlid, "previousUlid must not be null!");
  if(previousUlid.timestamp() == timestamp)
  {
    return previousUlid.increment();
  }
  return nextValue(timestamp);
}
origin: huxi/sulky

/**
 * Returns the next monotonic value. If an overflow happened while incrementing
 * the random part of the given previous ULID value then the returned value will
 * have a zero random part.
 *
 * @param previousUlid the previous ULID value.
 * @param timestamp the timestamp of the next ULID value.
 * @return the next monotonic value.
 */
public Value nextMonotonicValue(Value previousUlid, long timestamp)
{
  Objects.requireNonNull(previousUlid, "previousUlid must not be null!");
  if(previousUlid.timestamp() == timestamp)
  {
    return previousUlid.increment();
  }
  return nextValue(timestamp);
}
de.huxhorn.sulky.ulidULIDnextValue

Popular methods of ULID

  • nextULID
  • checkTimestamp
  • internalAppendCrockford
  • internalAppendULID
  • internalNextValue
  • internalParseCrockford
  • internalUIDString
  • internalWriteCrockford
  • nextMonotonicValue
    Returns the next monotonic value. If an overflow happened while incrementing the random part of the
  • nextStrictlyMonotonicValue
    Returns the next monotonic value or empty if an overflow happened while incrementing the random part

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now