com.helger.commons.version.Version Java Examples
The following examples show how to use
com.helger.commons.version.Version.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThirdPartyModule.java From ph-commons with Apache License 2.0 | 5 votes |
public ThirdPartyModule (@Nonnull @Nonempty final String sDisplayName, @Nonnull @Nonempty final String sCopyrightOwner, @Nonnull final ILicense aLicense, final boolean bOptional) { this (sDisplayName, sCopyrightOwner, aLicense, (Version) null, (String) null, bOptional); }
Example #2
Source File: ThirdPartyModule.java From ph-commons with Apache License 2.0 | 5 votes |
public ThirdPartyModule (@Nonnull @Nonempty final String sDisplayName, @Nonnull @Nonempty final String sCopyrightOwner, @Nonnull final ILicense aLicense, @Nullable final Version aVersion, @Nullable final String sWebsiteURL) { this (sDisplayName, sCopyrightOwner, aLicense, aVersion, sWebsiteURL, DEFAULT_OPTIONAL); }
Example #3
Source File: ThirdPartyModule.java From ph-commons with Apache License 2.0 | 5 votes |
public ThirdPartyModule (@Nonnull @Nonempty final String sDisplayName, @Nonnull @Nonempty final String sCopyrightOwner, @Nonnull final ILicense aLicense, @Nullable final Version aVersion, @Nullable final String sWebsiteURL, final boolean bOptional) { m_sDisplayName = ValueEnforcer.notEmpty (sDisplayName, "DisplayName"); m_sCopyrightOwner = ValueEnforcer.notEmpty (sCopyrightOwner, "CopyrightOwner"); m_aLicense = ValueEnforcer.notNull (aLicense, "License"); m_aVersion = aVersion; m_sWebSiteURL = sWebsiteURL; m_bOptional = bOptional; }
Example #4
Source File: CustomLicense.java From ph-commons with Apache License 2.0 | 4 votes |
@Nullable public Version getVersion () { return m_aVersion; }
Example #5
Source File: ThirdPartyModule.java From ph-commons with Apache License 2.0 | 4 votes |
@Nullable public Version getVersion () { return m_aVersion; }
Example #6
Source File: ThirdPartyModuleTest.java From ph-commons with Apache License 2.0 | 4 votes |
@Test public void testStd () { CommonsTestHelper.testDefaultImplementationWithEqualContentObject (new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1), new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1)); final ThirdPartyModule mod = new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1, Version.parse ("1.1"), "url", true); CommonsTestHelper.testDefaultImplementationWithEqualContentObject (mod, new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1, Version.parse ("1.1"), "url", true)); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (mod, new ThirdPartyModule ("displayname2", "owner", ELicense.APACHE1, Version.parse ("1.1"), "url", true)); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (mod, new ThirdPartyModule ("displayname", "owner2", ELicense.APACHE1, Version.parse ("1.1"), "url", true)); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (mod, new ThirdPartyModule ("displayname", "owner", ELicense.APACHE2, Version.parse ("1.1"), "url", true)); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (mod, new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1, Version.parse ("1.1.2"), "url", true)); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (mod, new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1, Version.parse ("1.1"), "url2", true)); CommonsTestHelper.testDefaultImplementationWithDifferentContentObject (mod, new ThirdPartyModule ("displayname", "owner", ELicense.APACHE1, Version.parse ("1.1"), "url", false)); }
Example #7
Source File: CustomLicense.java From ph-commons with Apache License 2.0 | 3 votes |
/** * Create a custom license. * * @param sID * The ID of the license. * @param sName * The name of the license. * @param aVersion * The version of the license. * @param sURL * The URL of the license. */ public CustomLicense (@Nonnull @Nonempty final String sID, @Nonnull @Nonempty final String sName, @Nullable final Version aVersion, @Nullable final String sURL) { m_sID = ValueEnforcer.notEmpty (sID, "ID"); m_sName = ValueEnforcer.notEmpty (sName, "Name"); m_aVersion = aVersion; m_sWebSiteURL = sURL; }
Example #8
Source File: IThirdPartyModule.java From ph-commons with Apache License 2.0 | 2 votes |
/** * @return The optional version of this product. May be <code>null</code> * because this means another place where the version number needs to * be maintained. */ @Nullable Version getVersion ();