]>
git.argeo.org Git - gpl/argeo-slc.git/blob - VersionDistributionId.java
44af89451030f37aaa6dbb109994ece72dd570b8
1 package org
.argeo
.slc
.core
.build
;
3 import java
.util
.StringTokenizer
;
6 public class VersionDistributionId
implements DistributionId
{
10 private Integer release
;
11 private String additional
;
13 public void setVersionString(String str
) {
14 StringTokenizer st
= new StringTokenizer(str
, ".");
15 if (st
.hasMoreTokens())
16 major
= Integer
.parseInt(st
.nextToken());
17 if (st
.hasMoreTokens())
18 minor
= Integer
.parseInt(st
.nextToken());
19 if (st
.hasMoreTokens())
20 release
= Integer
.parseInt(st
.nextToken());
21 if (st
.hasMoreTokens())
22 additional
= st
.nextToken();
25 public Integer
getMajor() {
29 public void setMajor(Integer major
) {
33 public Integer
getMinor() {
37 public void setMinor(Integer minor
) {
41 public Integer
getRelease() {
45 public void setRelease(Integer release
) {
46 this.release
= release
;
49 public String
getAdditional() {
53 public void setAdditional(String additional
) {
54 this.additional
= additional
;
58 public boolean equals(Object obj
) {
59 // TODO Auto-generated method stub
60 return super.equals(obj
);
64 public String
toString() {
65 return major
+ "." + minor
+ "." + release
66 + (additional
!= null ?
"." + additional
: "");