VersionBuilders.VersionInfo


@RequiresSchemaVersion(major = 1, minor = 0)
public final class VersionBuilders.VersionInfo implements Comparable


Version information. This is used to encode the schema version of a payload (e.g. inside of a layout).

Summary

Nested types

Builder for VersionInfo

Public methods

int
boolean
int

Gets major version.

int

Gets minor version.

int
@NonNull String

Public methods

compareTo

Added in 1.1.0
public int compareTo(@NonNull VersionBuilders.VersionInfo other)

equals

public boolean equals(@Nullable Object obj)

getMajor

Added in 1.0.0
public int getMajor()

Gets major version. Incremented on breaking changes (i.e. compatibility is not guaranteed across major versions).

getMinor

Added in 1.0.0
public int getMinor()

Gets minor version. Incremented on non-breaking changes (e.g. schema additions). Anything consuming a payload can safely consume anything with a lower minor version.

hashCode

public int hashCode()

toString

public @NonNull String toString()