net.sf.uadetector.ReadableVersionNumber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of uadetector-core Show documentation
Show all versions of uadetector-core Show documentation
The UADetector core library includes the API and implementation to read the detection information and the functions to identify User-Agents, but not the database (also known as UAS data). The UAS data can be found in the resources module.
The newest version!
/*******************************************************************************
* Copyright 2012 André Rouél
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package net.sf.uadetector;
import java.util.List;
/**
* 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:
*
* - Major release
* indexes mostly very significant change in the program - for example when the program was completely rewritten or
* libraries can be maintained at no interface compatibility.
* - Minor release
* usually referred to a functional extension of a program.
* - Patch level
* contains mostly bug fixes.
*
* 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
*/
public interface ReadableVersionNumber
extends Comparable
{
/**
* Gets the bugfix category of the version number.
*
* @return bugfix segment
*/
@javax.validation.constraints.NotNull
String getBugfix();
/**
* Gets the additions or extension of the version number.
*
* @return extension of the version number
*/
@javax.validation.constraints.NotNull
String getExtension();
/**
* 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.
*
* @return a list of segments of the version number
*/
@javax.validation.constraints.NotNull
List getGroups();
/**
* Gets the major category of the version number.
*
* @return major segment
*/
@javax.validation.constraints.NotNull
String getMajor();
/**
* Gets the minor category of the version number.
*
* @return minor segment
*/
@javax.validation.constraints.NotNull
String getMinor();
/**
* Gets this version number as string.
*
* @return numeric groups as dot separated version string
*/
@javax.validation.constraints.NotNull
String toVersionString();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy