Class ExternalId.Key
- java.lang.Object
-
- com.google.gerrit.server.account.externalids.ExternalId.Key
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ExternalId
public abstract static class ExternalId.Key extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Key()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.eclipse.jgit.lib.ObjectId
caseSensitiveSha1()
static ExternalId.Key
create(String scheme, String id, boolean isCaseInsensitive)
Creates an external ID key.boolean
equals(Object obj)
static com.google.common.collect.ImmutableSet<ExternalId.Key>
from(Collection<ExternalId> extIds)
String
get()
Exports this external ID key as string with the format "scheme:id", or "id" if scheme is null.int
hashCode()
abstract String
id()
abstract boolean
isCaseInsensitive()
boolean
isScheme(String scheme)
static ExternalId.Key
parse(String externalId, boolean isCaseInsensitive)
Parses an external ID key from a string in the format "scheme:id" or "id".abstract String
scheme()
org.eclipse.jgit.lib.ObjectId
sha1()
String
toString()
-
-
-
Method Detail
-
create
public static ExternalId.Key create(String scheme, String id, boolean isCaseInsensitive)
Creates an external ID key.- Parameters:
scheme
- the scheme name, must not contain colons (':'), can benull
id
- the external ID, must not contain colons (':')isCaseInsensitive
- whether the external ID key is matched case insensitively- Returns:
- the created external ID key
-
parse
public static ExternalId.Key parse(String externalId, boolean isCaseInsensitive)
Parses an external ID key from a string in the format "scheme:id" or "id".- Returns:
- the parsed external ID key
-
scheme
public abstract String scheme()
-
id
public abstract String id()
-
isCaseInsensitive
public abstract boolean isCaseInsensitive()
-
isScheme
public boolean isScheme(String scheme)
-
sha1
@Memoized public org.eclipse.jgit.lib.ObjectId sha1()
-
caseSensitiveSha1
@Memoized public org.eclipse.jgit.lib.ObjectId caseSensitiveSha1()
-
get
public String get()
Exports this external ID key as string with the format "scheme:id", or "id" if scheme is null.This string representation is used as subsection name in the Git config file that stores the external ID.
-
from
public static com.google.common.collect.ImmutableSet<ExternalId.Key> from(Collection<ExternalId> extIds)
-
-