|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number org.jmythapi.protocol.response.impl.AGroup<E> org.jmythapi.protocol.response.impl.AFlagGroup<E>
public abstract class AFlagGroup<E extends Enum<E> & IFlag>
Field Summary |
---|
Fields inherited from class org.jmythapi.protocol.response.impl.AGroup |
---|
groupClass, logger, longValue, protoVersion |
Constructor Summary | |
---|---|
AFlagGroup(Class<E> groupClass,
ProtocolVersion protoVersion,
long enumValue)
|
Method Summary | ||
---|---|---|
EnumSet<E> |
getActiveFlags()
Gets all currently active flags of this group. |
|
EnumMap<E,Boolean> |
getFlagMap()
Gets a map with all flags and their isSet status. |
|
static
|
getFlagValue(ProtocolVersion protoVersion,
E flag)
Gets the long value of the given flag. |
|
EnumSet<E> |
getInactiveFlags()
Gets all currently inactive flags of this group. |
|
EnumSet<E> |
getSupportedFlags()
Gets all possible flags of this flag group. |
|
static
|
getSupportedFlags(Class<E> groupClass,
ProtocolVersion protoVersion)
|
|
boolean |
isSet(E flag)
Checks if the given flag is actually set. |
|
boolean |
isSupportedFlag(E flag)
|
|
String |
toString()
Calculates a string representation of this flag-group. |
|
static
|
valueOf(Class<G> groupClass,
ProtocolVersion protoVersion,
E... flags)
|
Methods inherited from class org.jmythapi.protocol.response.impl.AGroup |
---|
clone, createObject, doubleValue, equals, floatValue, formatTo, getGroupClass, getVersionNr, hashCode, intValue, longValue, valueOf, valueOf, valueOf |
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 |
---|
public AFlagGroup(Class<E> groupClass, ProtocolVersion protoVersion, long enumValue)
Method Detail |
---|
public EnumSet<E> getSupportedFlags()
IFlagGroup
getSupportedFlags
in interface IFlagGroup<E extends Enum<E> & IFlag>
public EnumSet<E> getActiveFlags()
IFlagGroup
getActiveFlags
in interface IFlagGroup<E extends Enum<E> & IFlag>
public EnumSet<E> getInactiveFlags()
IFlagGroup
getInactiveFlags
in interface IFlagGroup<E extends Enum<E> & IFlag>
public boolean isSupportedFlag(E flag)
public boolean isSet(E flag)
IFlagGroup
isSet
in interface IFlagGroup<E extends Enum<E> & IFlag>
flag
- the flag to check
true
if the flag is currently set.public EnumMap<E,Boolean> getFlagMap()
IFlagGroup
getFlagMap
in interface IFlagGroup<E extends Enum<E> & IFlag>
public static <E extends Enum<E> & IFlag> Long getFlagValue(ProtocolVersion protoVersion, E flag)
If the given flag is of type IVersionableValue
then IVersionableValue.getValue(ProtocolVersion)
is used to determine the flag value, otherwise IFlag.getFlagValue()
is used.
Depending of the given protocol version, the returned value may be different.
null
if the flag object was null.public static <E extends Enum<E> & IFlag> EnumSet<E> getSupportedFlags(Class<E> groupClass, ProtocolVersion protoVersion)
public static <E extends Enum<E> & IFlag,G extends AGroup<E>> G valueOf(Class<G> groupClass, ProtocolVersion protoVersion, E... flags)
public String toString()
Calculates a string representation of this flag-group.
E.g.4=> {FL_AUTOEXP}
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |