com.opera.core.systems
Enum OperaProduct

java.lang.Object
  extended by java.lang.Enum<OperaProduct>
      extended by com.opera.core.systems.OperaProduct
All Implemented Interfaces:
Serializable, Comparable<OperaProduct>

public enum OperaProduct
extends Enum<OperaProduct>

A list of all Opera products. Use the is(OperaProduct) to compare and check products.


Enum Constant Summary
ALL
          Never returned, but can be used to request any product.
CORE
           
DESKTOP
           
MINI
           
MOBILE
           
SDK
           
 
Method Summary
static OperaProduct get(String product)
           
 boolean is(OperaProduct compareWith)
          Compares current product with given product.
 String toString()
           
static OperaProduct valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OperaProduct[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CORE

public static final OperaProduct CORE

DESKTOP

public static final OperaProduct DESKTOP

SDK

public static final OperaProduct SDK

MOBILE

public static final OperaProduct MOBILE

MINI

public static final OperaProduct MINI

ALL

public static final OperaProduct ALL
Never returned, but can be used to request any product.

Method Detail

values

public static OperaProduct[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OperaProduct c : OperaProduct.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OperaProduct valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toString

public String toString()
Overrides:
toString in class Enum<OperaProduct>

is

public boolean is(OperaProduct compareWith)
Compares current product with given product. Some products, such as the general product CORE, might map to several different products, such as CORE_DESKTOP, CORE_SMARTPHONE and CORE_TV.

Parameters:
compareWith - the product to compare the current one with
Returns:
true if the products are the same, false otherwise

get

public static OperaProduct get(String product)


Copyright © 2012. All Rights Reserved.