Record Class ReleaseConfiguration

java.lang.Object
java.lang.Record
io.github.joke.conventionalversion.config.ReleaseConfiguration

public record ReleaseConfiguration(List<ReleasePackage> packages, List<LinkedGroup> linkedGroups) extends Record
The release layout of a repository: what is releasable, and what is held in lockstep.

A path claimed by no package is not meant to be released — an internal module, a shared component, an aggregator. That is a statement the configuration makes, not an omission to repair.

  • Constructor Details

    • ReleaseConfiguration

      public ReleaseConfiguration(List<ReleasePackage> packages, List<LinkedGroup> linkedGroups)
      Creates an instance of a ReleaseConfiguration record class.
      Parameters:
      packages - the value for the packages record component
      linkedGroups - the value for the linkedGroups record component
  • Method Details

    • claiming

      public Optional<ReleasePackage> claiming(String path)
      The package claiming a repository-relative path, deepest declaration first.
    • groupOf

      public Optional<LinkedGroup> groupOf(String component)
      The group holding a component, when one does.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • packages

      public List<ReleasePackage> packages()
      Returns the value of the packages record component.
      Returns:
      the value of the packages record component
    • linkedGroups

      public List<LinkedGroup> linkedGroups()
      Returns the value of the linkedGroups record component.
      Returns:
      the value of the linkedGroups record component