com.google.wave.api
Enum ProtocolVersion
java.lang.Object
java.lang.Enum<ProtocolVersion>
com.google.wave.api.ProtocolVersion
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<ProtocolVersion>
public enum ProtocolVersion
- extends java.lang.Enum<ProtocolVersion>
An enumeration that represents the robot API wire protocol versions.
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
V1
public static final ProtocolVersion V1
V2
public static final ProtocolVersion V2
V2_1
public static final ProtocolVersion V2_1
V2_2
public static final ProtocolVersion V2_2
DEFAULT
public static final ProtocolVersion DEFAULT
- The default protocol version.
values
public static ProtocolVersion[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (ProtocolVersion c : ProtocolVersion.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static ProtocolVersion valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
getVersionString
public java.lang.String getVersionString()
- Returns:
- the version string.
isLessThan
public boolean isLessThan(ProtocolVersion other)
- Parameters:
other - the other ProtocolVersion to compare to.
- Returns:
true if this version is less than the other
version.
isLessThanOrEqual
public boolean isLessThanOrEqual(ProtocolVersion other)
- Parameters:
other - the other ProtocolVersion to compare to.
- Returns:
true if this version is less than or equal to the
other version.
isGreaterThanOrEqual
public boolean isGreaterThanOrEqual(ProtocolVersion other)
- Parameters:
other - the other ProtocolVersion to compare to.
- Returns:
true if this version is greater than or equal to
the other version.
isGreaterThan
public boolean isGreaterThan(ProtocolVersion other)
- Parameters:
other - the other ProtocolVersion to compare to.
- Returns:
true if this version is greater than the
other version.
fromVersionString
public static ProtocolVersion fromVersionString(java.lang.String versionString)
- Returns a
ProtocolVersion that represents the given version string,
or DEFAULT if the version string is invalid.
- Parameters:
versionString - the version string.
- Returns:
- a
ProtocolVersion.