org.apache.shindig.protocol.model
Interface Enum<E extends Enum.EnumKey>

All Known Implementing Classes:
EnumImpl

public interface Enum<E extends Enum.EnumKey>

see http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/opensocial-reference#opensocial.Enum Base class for all Enum objects. This class allows containers to use constants for fields that have a common set of values.


Nested Class Summary
static interface Enum.EnumKey
          base interface for keyed Enumerators.
static class Enum.Field
          Set of fields associated with an Enum object.
 
Method Summary
 String getDisplayValue()
          Gets the value of this Enum.
 E getValue()
          Gets the key for this Enum.
 void setDisplayValue(String displayValue)
          Sets the value of this Enum.
 void setValue(E value)
          Sets the key for this Enum.
 

Method Detail

getDisplayValue

String getDisplayValue()
Gets the value of this Enum. This is the string displayed to the user. If the container supports localization, the string should be localized.

Returns:
the Enum's user visible value

setDisplayValue

void setDisplayValue(String displayValue)
Sets the value of this Enum. This is the string displayed to the user. If the container supports localization, the string should be localized.

Parameters:
displayValue - The value to set.

getValue

E getValue()
Gets the key for this Enum. Use this for logic within your gadget.

Returns:
java.lang.Enum key object for this Enum.

setValue

void setValue(E value)
Sets the key for this Enum. Use this for logic within your gadget.

Parameters:
value - The value to set.


Copyright © 2007-2012. All Rights Reserved.