Package com.iab.gdpr
Enum Purpose
- java.lang.Object
-
- java.lang.Enum<Purpose>
-
- com.iab.gdpr.Purpose
-
- All Implemented Interfaces:
Serializable,Comparable<Purpose>
public enum Purpose extends Enum<Purpose>
Enumeration of currently defined purposes by IAB
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AD_SELECTIONCONTENT_DELIVERYMEASUREMENTPERSONALIZATIONSTORAGE_AND_ACCESSUNDEFINED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()static PurposevalueOf(int purposeId)Map numeric purpose ID to Enumstatic PurposevalueOf(String name)Returns the enum constant of this type with the specified name.static Purpose[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STORAGE_AND_ACCESS
public static final Purpose STORAGE_AND_ACCESS
-
PERSONALIZATION
public static final Purpose PERSONALIZATION
-
AD_SELECTION
public static final Purpose AD_SELECTION
-
CONTENT_DELIVERY
public static final Purpose CONTENT_DELIVERY
-
MEASUREMENT
public static final Purpose MEASUREMENT
-
UNDEFINED
public static final Purpose UNDEFINED
-
-
Method Detail
-
values
public static Purpose[] 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 (Purpose c : Purpose.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Purpose 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 nameNullPointerException- if the argument is null
-
getId
public int getId()
-
valueOf
public static Purpose valueOf(int purposeId)
Map numeric purpose ID to Enum- Parameters:
purposeId- purpose ID- Returns:
- Enum value of purpose
-
-