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

java.lang.Object
  extended by java.lang.Number
      extended by org.jmythapi.protocol.response.impl.AGroup<E>
All Implemented Interfaces:
Serializable, Cloneable, Formattable
Direct Known Subclasses:
AEnumGroup, AFlagGroup

public abstract class AGroup<E extends Enum<E>>
extends Number
implements Formattable, Cloneable

See Also:
Serialized Form

Field Summary
protected  Class<E> groupClass
          A Enum class defining all available values.
protected  Logger logger
          For logging
protected  long longValue
          The value of this flagGroup as Integer
protected  ProtocolVersion protoVersion
          The current protocol version
 
Constructor Summary
AGroup(Class<E> groupClass, ProtocolVersion protoVersion, int enumValue)
           
AGroup(Class<E> groupClass, ProtocolVersion protoVersion, long enumValue)
           
 
Method Summary
 Object clone()
           
static
<G> G
createObject(Class<G> groupClass, ProtocolVersion protoVersion, long groupValue)
           
 double doubleValue()
           
 boolean equals(Object other)
           
 float floatValue()
           
 void formatTo(Formatter formatter, int flags, int width, int precision)
           
 Class<E> getGroupClass()
           
 ProtocolVersion getVersionNr()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
static
<G> G
valueOf(Class<G> groupClass, ProtocolVersion protoVersion, long value)
           
static
<G> G
valueOf(Class<G> groupClass, ProtocolVersion protoVersion, Number value)
           
static
<G> G
valueOf(Class<G> groupClass, ProtocolVersion protoVersion, String value)
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger
For logging


groupClass

protected final Class<E extends Enum<E>> groupClass
A Enum class defining all available values.


protoVersion

protected final ProtocolVersion protoVersion
The current protocol version


longValue

protected final long longValue
The value of this flagGroup as Integer

Constructor Detail

AGroup

public AGroup(Class<E> groupClass,
              ProtocolVersion protoVersion,
              int enumValue)

AGroup

public AGroup(Class<E> groupClass,
              ProtocolVersion protoVersion,
              long enumValue)
Method Detail

getVersionNr

public ProtocolVersion getVersionNr()

getGroupClass

public Class<E> getGroupClass()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

valueOf

public static <G> G valueOf(Class<G> groupClass,
                            ProtocolVersion protoVersion,
                            String value)

valueOf

public static <G> G valueOf(Class<G> groupClass,
                            ProtocolVersion protoVersion,
                            Number value)

valueOf

public static <G> G valueOf(Class<G> groupClass,
                            ProtocolVersion protoVersion,
                            long value)

createObject

public static <G> G createObject(Class<G> groupClass,
                                 ProtocolVersion protoVersion,
                                 long groupValue)
                      throws Exception
Throws:
Exception

intValue

public int intValue()
Specified by:
intValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

formatTo

public void formatTo(Formatter formatter,
                     int flags,
                     int width,
                     int precision)
Specified by:
formatTo in interface Formattable


Copyright © 2008-2013. All Rights Reserved.