Package com.force.api
Class ExtendedApiVersion
java.lang.Object
com.force.api.ExtendedApiVersion
- All Implemented Interfaces:
Comparable<ExtendedApiVersion>
public class ExtendedApiVersion extends Object implements Comparable<ExtendedApiVersion>
represents a single supported API version as reported by the
/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.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExtendedApiVersion.Season -
Constructor Summary
Constructors Constructor Description ExtendedApiVersion()ExtendedApiVersion(float version)ExtendedApiVersion(ExtendedApiVersion.Season s, int y)ExtendedApiVersion(String version) -
Method Summary
Modifier and Type Method Description intcompareTo(ExtendedApiVersion o)booleanequals(Object other)StringgetLabel()StringgetUrl()floatgetVersion()StringgetVersionString()voidsetLabel(String label)voidsetUrl(String url)voidsetVersion(float version)sets version number as a float.StringtoString()
-
Constructor Details
-
ExtendedApiVersion
public ExtendedApiVersion() -
ExtendedApiVersion
public ExtendedApiVersion(float version) -
ExtendedApiVersion
-
ExtendedApiVersion
- Parameters:
version- formatted as a string: "vX.Y", e.g. "v39.0"
-
-
Method Details
-
getLabel
-
setLabel
-
getUrl
-
setUrl
-
getVersion
public float getVersion() -
getVersionString
-
setVersion
public void setVersion(float version)sets version number as a float. This would more correct have been calledsetNumberbut the field name in REST API isversion.- Parameters:
version- version number as float, e.g. 25.0
-
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ExtendedApiVersion>
-