Package io.guise.framework.platform
Class AbstractProduct
java.lang.Object
io.guise.framework.platform.AbstractProduct
- All Implemented Interfaces:
Product
- Direct Known Subclasses:
AbstractBrandedProduct
,DefaultProduct
The default implementation of the identification of a product, such as a user agent or a plugin, on a particular platform.
- Author:
- Garret Wilson
-
Constructor Details
-
AbstractProduct
public AbstractProduct(String id, String name, String version, double versionNumber, int[] versionNumbers) ID, name, and version constructor.- Parameters:
id
- The identifying string of the product, ornull
if the ID 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 Details
-
getID
-
getName
-
getVersion
- Specified by:
getVersion
in interfaceProduct
- Returns:
- The version string provided by the product, or
null
if there is no string version of the product.
-
getVersionNumber
public double getVersionNumber()- Specified by:
getVersionNumber
in interfaceProduct
- Returns:
- The version number provided by the product, or
Double.NaN
if there is no version number of the product.
-
getVersionNumbers
public int[] getVersionNumbers()- Specified by:
getVersionNumbers
in interfaceProduct
- Returns:
- The version number components provided by the product, or
null
if there are no version number components of the product.
-