Class ExternalId.Key

    • Constructor Detail

      • Key

        public Key()
    • 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 be null
        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.

      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • hashCode

        @Memoized
        public int hashCode()
        Overrides:
        hashCode in class Object