Enum Class ELicense

java.lang.Object
java.lang.Enum<ELicense>
com.helger.base.thirdparty.ELicense
All Implemented Interfaces:
IHasID<String>, IHasDisplayName, ILicense, IHasVersion, Serializable, Comparable<ELicense>, 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 class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ELicense valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • 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.
    • getFromIDOrNull

      public static @Nullable ELicense getFromIDOrNull(@Nullable String sID)
      Find the license with the given ID.
      Parameters:
      sID - The ID to search for. May be null.
      Returns:
      null if no such license exists.