Interface ILicense

All Superinterfaces:
Comparable<ILicense>, IHeaderMatcher
All Known Implementing Classes:
SimpleLicense, UnknownLicense

public interface ILicense extends IHeaderMatcher, Comparable<ILicense>
The definition of a License.
  • Method Details

    • getLicenseFamily

      ILicenseFamily getLicenseFamily()
      Gets the license family.
      Returns:
      the ILicenseFamily implementation for this license.
    • getNote

      String getNote()
      Gets the note associated with the license.
      Returns:
      the note associated with this license. May be null or empty.
    • getName

      String getName()
      Returns the name of this license. If no name was specified then the name of the family is returned.
      Returns:
      the name of this license.
    • getFamilyName

      default String getFamilyName()
      Gets the name of the family that this license if part of.
      Returns:
      the name of the license family that this license is part of.
    • getMatcher

      IHeaderMatcher getMatcher()
      Get the header matcher for this license.
      Returns:
      the header matcher for this license.
    • compareTo

      default int compareTo(ILicense other)
      Specified by:
      compareTo in interface Comparable<ILicense>
    • hash

      static int hash(ILicense license)
      A default implementation of a License hash
      Parameters:
      license - the license to hash
      Returns:
      the license hash value
    • equals

      static boolean equals(ILicense license1, Object o)
      A default implementation of equals.
      Parameters:
      license1 - The license to check for equality.
      o - the object to check for equality to.
      Returns:
      true if the object is equal to the license1.
    • builder

      static ILicense.Builder builder()
      Gets a builder for licenses.
      Returns:
      An ILicense.Builder instance.