1 package net.sourceforge.argval.version; 2 3 4 import java.util.List; 5 6 7 /** 8 * The interface VersionNumber, represents a (software package) version. Where number is not 9 * strictly a number. Just a list of parts, as like many version (numbers) which are split up 10 * by a dot. The VersionNumber instance can contain any String, so also version number parts 11 * like 'alpha', 'beta', 'pre-release', or similar. 12 * 13 * @author <a href="http://sourceforge.net/users/verhagent/">T. Verhagen</a> 14 */ 15 public interface VersionNumber extends VersionNumberVisitorAcceptor { 16 17 /** 18 * A list of strings, which form together the version number. 19 * @return The list of strings. 20 */ 21 List<String> getPartitionedVersion(); 22 23 /** 24 * Returns the version number as text, using the separator, for separation of the 25 * different version number parts. 26 * 27 * Example: 28 * <pre> 29 * Given the version number parts: [2, 2, 3, beta, 3] 30 * Will result in the text: '2.2.3.beta.3' 31 * </pre> 32 * 33 * @param separator - the separator, used between the different version number parts. 34 * @return The version number as text. 35 */ 36 String getAsText(String separator); 37 38 }