public class ExtendedApiVersion extends Object implements Comparable<ExtendedApiVersion>
/services/data resource
for the instance endpoint returned on authentication.
com.frejo.api.ApiVersion was originally used to set the current API version and manage the complete list
of versions as an enum. It will likely be phased out in favor of using plain version strings along with this class
for more extended version information.
This is a tweak to an original proposal by @cswendrowski.| Modifier and Type | Class and Description |
|---|---|
static class |
ExtendedApiVersion.Season |
| Constructor and Description |
|---|
ExtendedApiVersion() |
ExtendedApiVersion(ExtendedApiVersion.Season s,
int y) |
ExtendedApiVersion(float version) |
ExtendedApiVersion(String version) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ExtendedApiVersion o) |
boolean |
equals(Object other) |
String |
getLabel() |
String |
getUrl() |
float |
getVersion() |
String |
getVersionString() |
void |
setLabel(String label) |
void |
setUrl(String url) |
void |
setVersion(float version)
sets version number as a float.
|
String |
toString() |
public ExtendedApiVersion()
public ExtendedApiVersion(float version)
public ExtendedApiVersion(ExtendedApiVersion.Season s, int y)
public ExtendedApiVersion(String version)
version - formatted as a string: "vX.Y", e.g. "v39.0"public String getLabel()
public void setLabel(String label)
public String getUrl()
public void setUrl(String url)
public float getVersion()
public String getVersionString()
public void setVersion(float version)
setNumber but
the field name in REST API is version.version - version number as float, e.g. 25.0public int compareTo(ExtendedApiVersion o)
compareTo in interface Comparable<ExtendedApiVersion>Copyright © 2017. All rights reserved.