net.sf.uadetector
Interface ReadableVersionNumber

All Superinterfaces:
java.lang.Comparable<ReadableVersionNumber>
All Known Implementing Classes:
VersionNumber

public interface ReadableVersionNumber
extends java.lang.Comparable<ReadableVersionNumber>

Defines a version number of an operating system or user agent.

Generally, a version number represents unique states of a software. Version numbers are different versions of a single software in order to distinguish different versions of development cycles.

A classic version number is often composed of:

A version number may also contain additions, for example, to document a development stage of a software.

The implementation of this interface may be mutable or immutable. This interface only gives access to retrieve data, never to change it.

Author:
André Rouél

Method Summary
 java.lang.String getBugfix()
          Gets the bugfix category of the version number.
 java.lang.String getExtension()
          Gets the additions or extension of the version number.
 java.util.List<java.lang.String> getGroups()
          Get all groups (or categories) of this version number.
 java.lang.String getMajor()
          Gets the major category of the version number.
 java.lang.String getMinor()
          Gets the minor category of the version number.
 java.lang.String toVersionString()
          Gets this version number as string.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getBugfix

@Nonnull
java.lang.String getBugfix()
Gets the bugfix category of the version number.

Returns:
bugfix segment

getExtension

@Nonnull
java.lang.String getExtension()
Gets the additions or extension of the version number.

Returns:
extension of the version number

getGroups

@Nonnull
java.util.List<java.lang.String> getGroups()
Get all groups (or categories) of this version number. The first element in the list is the major category, followed by the minor and bugfix segment of the version number.

The returned list of the version number segments should be immutable.

Returns:
a list of segments of the version number

getMajor

@Nonnull
java.lang.String getMajor()
Gets the major category of the version number.

Returns:
major segment

getMinor

@Nonnull
java.lang.String getMinor()
Gets the minor category of the version number.

Returns:
minor segment

toVersionString

@Nonnull
java.lang.String toVersionString()
Gets this version number as string.

Returns:
numeric groups as dot separated version string


Copyright © 2011-2014. All Rights Reserved.