com.guiseframework.platform
Class AbstractBrandedProduct<BRAND extends java.lang.Enum<BRAND> & BrandedProduct.Brand>

java.lang.Object
  extended by com.guiseframework.platform.AbstractProduct
      extended by com.guiseframework.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 com.guiseframework.platform.BrandedProduct
BrandedProduct.Brand
 
Constructor Summary
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
 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 com.guiseframework.platform.AbstractProduct
getID, getName, getVersion, getVersionNumber, getVersionNumbers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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, 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 Detail

getBrand

public BRAND getBrand()
Specified by:
getBrand in interface BrandedProduct<BRAND extends java.lang.Enum<BRAND> & BrandedProduct.Brand>
Returns:
The brand of the product.

isBrandVersionNumber

public boolean isBrandVersionNumber(BRAND brand,
                                    double versionNumber)
Determines whether this product has the indicated brand and version number.

Specified by:
isBrandVersionNumber in interface BrandedProduct<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)
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 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.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.