org.odata4j.core
Enum ODataVersion

java.lang.Object
  extended by java.lang.Enum<ODataVersion>
      extended by org.odata4j.core.ODataVersion
All Implemented Interfaces:
Serializable, Comparable<ODataVersion>

public enum ODataVersion
extends Enum<ODataVersion>

V1 or V2


Enum Constant Summary
V1
           
V2
           
 
Field Summary
 String asString
          1.0 or 2.0
 
Method Summary
static boolean isVersionGreaterThan(ODataVersion v, ODataVersion target)
          Returns true if the version v is greater than the target version
static boolean isVersionGreaterThanOrEqualTo(ODataVersion v, ODataVersion target)
          Returns true if the version v is greater than or equal to the target version
static ODataVersion parse(String str)
          Identify a version by version string.
static ODataVersion valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ODataVersion[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
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
 

Enum Constant Detail

V1

public static final ODataVersion V1

V2

public static final ODataVersion V2
Field Detail

asString

public final String asString
1.0 or 2.0

Method Detail

isVersionGreaterThan

public static boolean isVersionGreaterThan(ODataVersion v,
                                           ODataVersion target)
Returns true if the version v is greater than the target version


isVersionGreaterThanOrEqualTo

public static boolean isVersionGreaterThanOrEqualTo(ODataVersion v,
                                                    ODataVersion target)
Returns true if the version v is greater than or equal to the target version


parse

public static ODataVersion parse(String str)
Identify a version by version string.

Parameters:
str - the version string
Returns:
the version enum

valueOf

public static ODataVersion valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

values

public static ODataVersion[] 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 (ODataVersion c : ODataVersion.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared


http://odata4j.org