org.jmythapi.protocol.response.impl
Class AEnumGroup<E extends Enum<E>>

java.lang.Object
  extended by java.lang.Number
      extended by org.jmythapi.protocol.response.impl.AGroup<E>
          extended by org.jmythapi.protocol.response.impl.AEnumGroup<E>
All Implemented Interfaces:
Serializable, Cloneable, Formattable, IVersionable, IEnumGroup<E>, IGroup<E>
Direct Known Subclasses:
ADatabaseEnumGroup, AVersionableEnumGroup, ProgramRecordingSearchType, ProgramRecordingType

public abstract class AEnumGroup<E extends Enum<E>>
extends AGroup<E>
implements IEnumGroup<E>

An implementation of IEnumGroup.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jmythapi.protocol.response.impl.AGroup
groupClass, logger, longValue, protoVersion
 
Constructor Summary
AEnumGroup(Class<E> enumClass, ProtocolVersion protoVersion, long enumValue)
           
 
Method Summary
 E getEnum()
          Gets the current value as enum.
static
<E extends Enum<E>>
Long
getEnumValue(ProtocolVersion protoVersion, E prop)
           
 boolean hasEnum(E... props)
           
 boolean hasEnum(E prop)
           
 String toString()
           
static
<E extends Enum<E>,G extends AEnumGroup<E>>
G
valueOf(Class<G> groupClass, ProtocolVersion protoVersion, E prop)
           
 
Methods inherited from class org.jmythapi.protocol.response.impl.AGroup
clone, createObject, doubleValue, equals, floatValue, formatTo, getGroupClass, getVersionNr, hashCode, intValue, longValue
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmythapi.protocol.response.IGroup
getGroupClass, longValue
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 

Constructor Detail

AEnumGroup

public AEnumGroup(Class<E> enumClass,
                  ProtocolVersion protoVersion,
                  long enumValue)
Method Detail

getEnum

public E getEnum()
Description copied from interface: IEnumGroup
Gets the current value as enum.

Specified by:
getEnum in interface IEnumGroup<E extends Enum<E>>
Returns:
the current enum value

hasEnum

public boolean hasEnum(E prop)
Specified by:
hasEnum in interface IEnumGroup<E extends Enum<E>>

hasEnum

public boolean hasEnum(E... props)
Specified by:
hasEnum in interface IEnumGroup<E extends Enum<E>>

getEnumValue

public static <E extends Enum<E>> Long getEnumValue(ProtocolVersion protoVersion,
                                                    E prop)

valueOf

public static <E extends Enum<E>,G extends AEnumGroup<E>> G valueOf(Class<G> groupClass,
                                                                    ProtocolVersion protoVersion,
                                                                    E prop)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2013. All Rights Reserved.