|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmythapi.impl.AVersionRange<ProtocolVersion> org.jmythapi.protocol.ProtocolVersionRange
public class ProtocolVersionRange
This class represents a MythTV protocol version range.
It is mainly used by utility classes, such as EnumUtils
or CommandUtils
, to determine the valid
protocol-version range for a response property or command.
See MythProtoVersionAnnotation
for more information about protocol version ranges.
CommandUtils.getCommandVersionRange(String)
,
EnumUtils.getEnumVersionRange(Enum)
Field Summary | |
---|---|
static ProtocolVersionRange |
DEFAULT_RANGE
The default protocol-version range. |
Fields inherited from class org.jmythapi.impl.AVersionRange |
---|
fromVersion, toVersion |
Constructor Summary | |
---|---|
ProtocolVersionRange(MythProtoVersionAnnotation versionRange)
Constructs a version-range object from an protocol-version annotation |
|
ProtocolVersionRange(ProtocolVersion from,
Map<String,String> fromMetaData,
ProtocolVersion fromFallback,
ProtocolVersion to,
Map<String,String> toMetaData,
ProtocolVersion toFallback)
|
|
ProtocolVersionRange(ProtocolVersion from,
ProtocolVersion to)
|
Method Summary | |
---|---|
ProtocolVersion |
fromFallback()
|
Map<String,String> |
fromInfo()
|
boolean |
isInRange(int protoVersionNr)
Checks if the specified protocol-version is in this version-range. |
ProtocolVersionRange |
restrictRange(ProtocolVersionRange parentRange)
Generates a new protocol-version-range depending on the values of this range and a parent range. |
ProtocolVersion |
toFallback()
|
Map<String,String> |
toInfo()
|
Methods inherited from class org.jmythapi.impl.AVersionRange |
---|
equals, from, isInRange, to, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ProtocolVersionRange DEFAULT_RANGE
This range is used for commands or properties if no other range
was specified via an MythProtoVersionAnnotation
.
CommandUtils.getCommandVersionRange(String)
,
EnumUtils.getEnumVersionRange(Enum)
Constructor Detail |
---|
public ProtocolVersionRange(MythProtoVersionAnnotation versionRange)
versionRange
- the protocol-version-annotationpublic ProtocolVersionRange(ProtocolVersion from, ProtocolVersion to)
public ProtocolVersionRange(ProtocolVersion from, Map<String,String> fromMetaData, ProtocolVersion fromFallback, ProtocolVersion to, Map<String,String> toMetaData, ProtocolVersion toFallback)
Method Detail |
---|
public Map<String,String> fromInfo()
public ProtocolVersion fromFallback()
public Map<String,String> toInfo()
public ProtocolVersion toFallback()
public boolean isInRange(int protoVersionNr)
AVersionRange
isInRange
in class AVersionRange<ProtocolVersion>
protoVersionNr
- the protocol-version to check
true
if the given version is in the range.public ProtocolVersionRange restrictRange(ProtocolVersionRange parentRange)
parentRange
- the parent version range
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |