Class AbstractBrandedProduct<BRAND extends Enum<BRAND> & BrandedProduct.Brand>

java.lang.Object
io.guise.framework.platform.AbstractProduct
io.guise.framework.platform.AbstractBrandedProduct<BRAND>
All Implemented Interfaces:
BrandedProduct<BRAND>, Product
Direct Known Subclasses:
DefaultWebUserAgentProduct

public class AbstractBrandedProduct<BRAND extends Enum<BRAND> & BrandedProduct.Brand> extends AbstractProduct implements BrandedProduct<BRAND>
The default implementation of the identification of a branded product, such as a user agent or a plugin, on a particular platform.
Author:
Garret Wilson
  • Constructor Details

    • AbstractBrandedProduct

      public AbstractBrandedProduct(String id, BRAND brand, String name, String version, double versionNumber, int[] versionNumbers)
      ID, brand, name, and version constructor.
      Parameters:
      id - The identifying string of the product, or null if the ID is not known.
      brand - The brand of the product, or null if the brand is not known.
      name - The canonical name of the product, or null if the name is not known.
      version - The version string provided by the product, or null if there is no string version of the product.
      versionNumber - The version number provided by the product, or Double.NaN if there is no version number of the product.
      versionNumbers - The version number components provided by the product, or null if there are no version number components of the product.
  • Method Details

    • getBrand

      public BRAND getBrand()
      Specified by:
      getBrand in interface BrandedProduct<BRAND extends Enum<BRAND> & BrandedProduct.Brand>
      Returns:
      The brand of the product, or null if the brand is not known.
    • isBrandVersionNumber

      public boolean isBrandVersionNumber(BRAND brand, double versionNumber)
      Description copied from interface: BrandedProduct
      Determines whether this product has the indicated brand and version number.
      Specified by:
      isBrandVersionNumber in interface BrandedProduct<BRAND extends Enum<BRAND> & BrandedProduct.Brand>
      Parameters:
      brand - The brand to check for.
      versionNumber - The version number to check for.
      Returns:
      true if this product has the indicated brand and version number.
    • isBrandLessThanVersionNumber

      public boolean isBrandLessThanVersionNumber(BRAND brand, double versionNumber)
      Description copied from interface: BrandedProduct
      Determines whether this product has the indicated brand and a version number less than the one indicated.
      Specified by:
      isBrandLessThanVersionNumber in interface BrandedProduct<BRAND extends Enum<BRAND> & BrandedProduct.Brand>
      Parameters:
      brand - The brand to check for.
      versionNumber - The version number to check for.
      Returns:
      true if this product has the indicated brand and a version number less than the one indicated.