Class CustomLicense

java.lang.Object
com.helger.base.thirdparty.CustomLicense
All Implemented Interfaces:
IHasID<String>, IHasDisplayName, ILicense, IHasVersion

@Immutable public class CustomLicense extends Object implements ILicense
Represents a custom license.
Author:
Philip Helger
  • Constructor Details

    • CustomLicense

      public CustomLicense(@Nonempty @NonNull @Nonempty String sID, @Nonempty @NonNull @Nonempty String sName, @Nullable Version aVersion, @Nullable String sURL)
      Create a custom license.
      Parameters:
      sID - The ID of the license.
      sName - The name of the license.
      aVersion - The version of the license.
      sURL - The URL of the license.
  • Method Details

    • getID

      @Nonempty public @NonNull @Nonempty String getID()
      Description copied from interface: IHasID
      Get the unique ID of this object. If the type is String than the returned value must match an XML NMToken expression (so e.g. no ':' in the ID)!
      Specified by:
      getID in interface IHasID<String>
      Returns:
      The unique ID of this license. Neither null nor empty.
    • getDisplayName

      @Nonempty public @NonNull @Nonempty String getDisplayName()
      Specified by:
      getDisplayName in interface IHasDisplayName
      Returns:
      The display name of this license. Neither null nor empty.
    • getVersion

      public @Nullable Version getVersion()
      Specified by:
      getVersion in interface IHasVersion
      Returns:
      The version of this license. May be null.
    • getURL

      public @Nullable String getURL()
      Specified by:
      getURL in interface ILicense
      Returns:
      The URL of this license. May be null.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object