Codota Logo
ULID.nextValue
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • orElseThrow (Optional)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now