Package icyllis.arc3d.granite

# Class DrawAtlas.AtlasToken

java.lang.Object
icyllis.arc3d.granite.DrawAtlas.AtlasToken

Enclosing class:
  `DrawAtlas`

public static class DrawAtlas.AtlasToken extends Object
AtlasToken is used to sequence uploads relative to each other and to batches of draws.

AtlasToken is represented as an unsigned long sequence number. Wrapping is allowed, 0 is reserved for the invalid token. Do not use operator to compare, use method instead.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final long`
  `INVALID_TOKEN`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `compare(long lhs, long rhs)`
  Compares two tokens with wrapping.
  `static boolean`
  `inInterval(long token, long start, long end)`
  Returns true if the token is in the [start, end] inclusive interval.
  `static long`
  `next(long token)`
  Returns next valid sequence number.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### INVALID_TOKEN

    public static final long INVALID_TOKEN
    See Also:
      - Constant Field Values

- ## Method Details

  - ### next

    public static long next(long token)
    Returns next valid sequence number.

  - ### compare

    public static int compare(long lhs, long rhs)
    Compares two tokens with wrapping.

  - ### inInterval

    public static boolean inInterval(long token, long start, long end)
    Returns true if the token is in the [start, end] inclusive interval.