org.jmythapi.protocol.response.impl
Class AGroup<E extends Enum<E>>
java.lang.Object
java.lang.Number
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
Method Summary |
Object |
clone()
|
static
|
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
|
valueOf(Class<G> groupClass,
ProtocolVersion protoVersion,
long value)
|
static
|
valueOf(Class<G> groupClass,
ProtocolVersion protoVersion,
Number value)
|
static
|
valueOf(Class<G> groupClass,
ProtocolVersion protoVersion,
String value)
|
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
AGroup
public AGroup(Class<E> groupClass,
ProtocolVersion protoVersion,
int enumValue)
AGroup
public AGroup(Class<E> groupClass,
ProtocolVersion protoVersion,
long enumValue)
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.