Package io.guise.framework.platform
Class AbstractProduct
- java.lang.Object
-
- io.guise.framework.platform.AbstractProduct
-
- All Implemented Interfaces:
Product
- Direct Known Subclasses:
AbstractBrandedProduct
,DefaultProduct
public class AbstractProduct extends java.lang.Object implements Product
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 Summary
Constructors Constructor Description AbstractProduct(java.lang.String id, java.lang.String name, java.lang.String version, double versionNumber, int[] versionNumbers)
ID, name, and version constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getID()
java.lang.String
getName()
java.lang.String
getVersion()
double
getVersionNumber()
int[]
getVersionNumbers()
-
-
-
Constructor Detail
-
AbstractProduct
public AbstractProduct(java.lang.String id, java.lang.String name, java.lang.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 Detail
-
getID
public java.lang.String getID()
-
getName
public java.lang.String getName()
-
getVersion
public java.lang.String 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.
-
-