Package io.guise.framework.platform
Class AbstractBrandedProduct<BRAND extends java.lang.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 java.lang.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.guise.framework.platform.BrandedProduct
BrandedProduct.Brand
-
-
Constructor Summary
Constructors Constructor Description AbstractBrandedProduct(java.lang.String id, BRAND brand, java.lang.String name, java.lang.String version, double versionNumber, int[] versionNumbers)
ID, brand, name, and version constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BRAND
getBrand()
boolean
isBrandLessThanVersionNumber(BRAND brand, double versionNumber)
Determines whether this product has the indicated brand and a version number less than the one indicated.boolean
isBrandVersionNumber(BRAND brand, double versionNumber)
Determines whether this product has the indicated brand and version number.-
Methods inherited from class io.guise.framework.platform.AbstractProduct
getID, getName, getVersion, getVersionNumber, getVersionNumbers
-
-
-
-
Constructor Detail
-
AbstractBrandedProduct
public AbstractBrandedProduct(java.lang.String id, BRAND brand, java.lang.String name, java.lang.String version, double versionNumber, int[] versionNumbers)
ID, brand, name, and version constructor.- Parameters:
id
- The identifying string of the product, ornull
if the ID is not known.brand
- The brand of the product, ornull
if the brand is not known.name
- The canonical name of the product, ornull
if the name is not known.version
- The version string provided by the product, ornull
if there is no string version of the product.versionNumber
- The version number provided by the product, orDouble.NaN
if there is no version number of the product.versionNumbers
- The version number components provided by the product, ornull
if there are no version number components of the product.
-
-
Method Detail
-
getBrand
public BRAND getBrand()
- Specified by:
getBrand
in interfaceBrandedProduct<BRAND extends java.lang.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 interfaceBrandedProduct<BRAND extends java.lang.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 interfaceBrandedProduct<BRAND extends java.lang.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.
-
-