Class Account.Id

java.lang.Object
com.google.gerrit.entities.Account.Id
All Implemented Interfaces:
Comparable<Account.Id>
Enclosing class:
Account

public abstract static class Account.Id extends Object implements Comparable<Account.Id>
Key local to Gerrit to identify a user.
  • Constructor Details

    • Id

      public Id()
  • Method Details

    • tryParse

      public static Optional<Account.Id> tryParse(String str)
      Parse an Account.Id out of a string representation.
    • fromRef

      public static Account.Id fromRef(String name)
    • fromRefPart

      public static Account.Id fromRefPart(String name)
      Parse an Account.Id out of a part of a ref-name.
      Parameters:
      name - a ref name with the following syntax: "34/1234...". We assume that the caller has trimmed any prefix.
    • parseAfterShardedRefPart

      public static Account.Id parseAfterShardedRefPart(String name)
    • fromRefSuffix

      public static Account.Id fromRefSuffix(String name)
      Parse an Account.Id out of the last part of a ref name.

      The input is a ref name of the form ".../1234", where the suffix is a non-sharded account ID. Ref names using a sharded ID should use fromRefPart(String) instead for greater safety.

      Parameters:
      name - ref name
      Returns:
      account ID, or null if not numeric.
    • get

      public int get()
    • compareTo

      public final int compareTo(Account.Id o)
      Specified by:
      compareTo in interface Comparable<Account.Id>
    • toString

      public final String toString()
      Overrides:
      toString in class Object