Interface ChangeToken


public interface ChangeToken
Change Token ("Tag") for ReadableResource.changeToken().

This is named a "change token" and not "version" (or "revision") because that might imply something “numeric” - but this is explicitly NOT intended to be used for “is it newer or older” comparison, only “has it changed”. It's also not called a "fingerprint" because that might imply it's derived only from the content itself (like a hash), whereas this may be based on more than that, e.g. additional metadata.

  • Field Details

  • Method Details

    • isDifferent

      boolean isDifferent(ChangeToken other)
      Check is this ChangeToken is different from that other ChangeToken.

      If it's not sure, prefer "erring on the side of caution" by returning true instead of false. That's why two NOT_AVAILABLE are considered representing (possibly) different resource contents (returns true).

    • toString

      String representation of this ChangeToken, (only) for ReadableResource.isDifferent(String).

      Do not interpret the content of this String. It's intended to be used completely "opaque", and only for before & after comparison, on a Resource from the same URI. Implementations are encouraged to return strings which do not (directly) "look like something familiar", to avoid users relying on implementation details.

      Overrides:
      toString in class Object
    • toBytes