Package org.robolectric.versioning
Class AndroidVersions.AndroidRelease
java.lang.Object
org.robolectric.versioning.AndroidVersions.AndroidRelease
- All Implemented Interfaces:
- Comparable<AndroidVersions.AndroidRelease>
- Direct Known Subclasses:
- AndroidVersions.J,- AndroidVersions.JMR1,- AndroidVersions.JMR2,- AndroidVersions.K,- AndroidVersions.L,- AndroidVersions.LMR1,- AndroidVersions.M,- AndroidVersions.N,- AndroidVersions.NMR1,- AndroidVersions.O,- AndroidVersions.OMR1,- AndroidVersions.P,- AndroidVersions.Q,- AndroidVersions.R,- AndroidVersions.S,- AndroidVersions.Sv2,- AndroidVersions.T,- AndroidVersions.U,- AndroidVersions.V
- Enclosing class:
- AndroidVersions
public abstract static class AndroidVersions.AndroidRelease
extends Object
implements Comparable<AndroidVersions.AndroidRelease>
Representation of an android release, one that has occurred, or is expected.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintImplements comparable.inttrue if this release has already occurred, false otherwise.single character short code for the release, multiple characters for minor releases (only minor version numbers increment - usually within the same year).major.minor version number as String.booleantrue if this release has already occurred, false otherwise.toString()
- 
Constructor Details- 
AndroidReleasepublic AndroidRelease()
 
- 
- 
Method Details- 
getSdkIntpublic int getSdkInt()true if this release has already occurred, false otherwise. If unreleased, the getSdkInt may still be that of the prior release.
- 
getShortCodesingle character short code for the release, multiple characters for minor releases (only minor version numbers increment - usually within the same year).
- 
isReleasedpublic boolean isReleased()true if this release has already occurred, false otherwise. If unreleased, the getSdkInt will guess at the likely sdk number. Your code will need to recompile if this value changes - including most modern build tools; bazle, soong all are full build systems - and as such organizations using them have no concerns.
- 
getVersionmajor.minor version number as String.
- 
compareToImplements comparable.- Specified by:
- compareToin interface- Comparable<AndroidVersions.AndroidRelease>
- Parameters:
- other- the object to be compared.
- Returns:
- 1 if this is greater than other, 0 if equal, -1 if less
- Throws:
- RuntimeException- if other is not an instance of AndroidRelease.
 
- 
toString
 
-