Enum ELicense

java.lang.Object
java.lang.Enum<ELicense>
com.helger.commons.thirdparty.ELicense
All Implemented Interfaces:
IHasID<String>, IHasDisplayName, ILicense, IHasVersion, Serializable, Comparable<ELicense>, java.lang.constant.Constable

public enum ELicense extends Enum<ELicense> implements ILicense
Represents a bunch of Open Source licenses regularly used.
Author:
Philip Helger
  • Enum Constant Details

    • APACHE1

      public static final ELicense APACHE1
    • APACHE2

      public static final ELicense APACHE2
    • MPL10

      public static final ELicense MPL10
    • MPL11

      public static final ELicense MPL11
    • MPL20

      public static final ELicense MPL20
    • BSD

      public static final ELicense BSD
    • BSD3

      public static final ELicense BSD3
    • MIT

      public static final ELicense MIT
    • GPL10

      public static final ELicense GPL10
    • GPL20

      public static final ELicense GPL20
    • GPL20CP

      public static final ELicense GPL20CP
    • GPL30

      public static final ELicense GPL30
    • LGPL20

      public static final ELicense LGPL20
    • LGPL21

      public static final ELicense LGPL21
    • LGPL30

      public static final ELicense LGPL30
    • AGPL30

      public static final ELicense AGPL30
    • FDL11

      public static final ELicense FDL11
    • FDL12

      public static final ELicense FDL12
    • FDL13

      public static final ELicense FDL13
    • EPL10

      public static final ELicense EPL10
    • EPL20

      public static final ELicense EPL20
    • EDL10

      public static final ELicense EDL10
    • EUPL11

      public static final ELicense EUPL11
    • EUPL12

      public static final ELicense EUPL12
    • CCBY10

      public static final ELicense CCBY10
    • CCBY20

      public static final ELicense CCBY20
    • CCBY25

      public static final ELicense CCBY25
    • CCBY30

      public static final ELicense CCBY30
    • CCBY40

      public static final ELicense CCBY40
    • PUBLIC_DOMAIN

      public static final ELicense PUBLIC_DOMAIN
  • Method Details

    • values

      public static ELicense[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ELicense valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getID

      @Nonnull @Nonempty public 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 ID of this object. May not be null.
    • getDisplayName

      @Nonnull @Nonempty public String getDisplayName()
      Specified by:
      getDisplayName in interface IHasDisplayName
      Returns:
      The display name of this object. Should never be null.
    • getVersion

      @Nullable public Version getVersion()
      Specified by:
      getVersion in interface IHasVersion
      Returns:
      The version number of the object. No assumption on nullable can be done.
    • getURL

      @Nullable public String getURL()
      Specified by:
      getURL in interface ILicense
    • getFromIDOrNull

      @Nullable public static ELicense getFromIDOrNull(@Nullable String sID)