Interface SCMHeadMixin

All Superinterfaces:
Comparable<SCMHead>, Serializable
All Known Subinterfaces:
ChangeRequestSCMHead, ChangeRequestSCMHead2
All Known Implementing Classes:
SCMHead

public interface SCMHeadMixin extends Comparable<SCMHead>, Serializable
Interface to allow declaring mixin interfaces for SCMHead subclasses. Do not implement this interface directly, rather extend from SCMHead and implement the appropriate mixins such as ChangeRequestSCMHead and TagSCMHead

Two SCMHeadMixin implementations are equal if and only if:

The Object.hashCode() for a SCMHeadMixin implementation must be equal to the String.hashCode() of getName()
Since:
2.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name.
    Returns the origin of the head.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • getName

      @Exported @NonNull String getName()
      Returns the name.
      Returns:
      the name.
    • getOrigin

      @Exported @NonNull SCMHeadOrigin getOrigin()
      Returns the origin of the head.
      • For centralized version control systems such as Subversion, CVS, etc the return value will always be SCMHeadOrigin.DEFAULT.
      • For distributed version control systems such as Git, Mercurial etc the return value may have other values.
      • For centralized distributed version control systems such as GitHub, Bitbucket, etc the return values may be restricted to SCMHeadOrigin.DEFAULT or instances of SCMHeadOrigin.Fork.
      Returns:
      the origin of the head or SCMHeadOrigin.DEFAULT if there can only ever be one origin.
      Since:
      2.2.0