1 package net.sourceforge.argval.version; 2 3 4 import java.util.ArrayList; 5 import java.util.List; 6 7 8 /** 9 * A factory for creation of VersionNumber instances. 10 * 11 * @author <a href="http://sourceforge.net/users/verhagent/">T. Verhagen</a> 12 */ 13 public class VersionNumberFactory { 14 15 /** 16 * Create a {@link VersionNumber} from a List of Integer instances. 17 * @param version - the version as List of Integer instances. 18 * @return The created VersionNumber 19 */ 20 public VersionNumber createFromNumber(List<Integer> version) { 21 final List<String> versionPartitionedList = new ArrayList<String>(); 22 for (Integer part : version) { 23 versionPartitionedList.add(part.toString()); 24 } 25 return new VersionNumberImpl(versionPartitionedList); 26 } 27 28 }