|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.argval.version.VersionHierarchyImpl
public class VersionHierarchyImpl
Field Summary | |
---|---|
protected org.slf4j.Logger |
logger
|
Fields inherited from interface net.sourceforge.argval.version.VersionHierarchy |
---|
VERSION_PART_SEPARATOR |
Constructor Summary | |
---|---|
VersionHierarchyImpl()
|
|
VersionHierarchyImpl(String versionPartSeparator)
|
Method Summary | |
---|---|
void |
accept(VersionNumberVisitor visitor)
The entry point for the visitor. |
void |
addVersion(List<String> version)
Adding a version number. |
void |
addVersion(String versionStr)
Adding a version number. |
void |
addVersion(VersionNumber version)
Adding a version number. |
List<String> |
convertVersion(String versionStr)
|
List<String> |
getRegisteredVersionAsStings()
Returns the registered versions as a List of String instances. |
List<VersionNumber> |
getRegisteredVersionNumbers()
Returns the registered versions as a List of VersionNumber instances. |
String |
getVersionPartSeparator()
|
boolean |
isCompatible(List<String> version)
Returns true if the version is compatible with the known versions. |
boolean |
isCompatible(String versionStr)
Returns true if the version is compatible with the known versions. |
boolean |
isCompatible(VersionNumber version)
Returns true if the version is compatible with the known versions. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.slf4j.Logger logger
Constructor Detail |
---|
public VersionHierarchyImpl()
public VersionHierarchyImpl(String versionPartSeparator)
Method Detail |
---|
public String getVersionPartSeparator()
public void addVersion(VersionNumber version)
VersionHierarchy
addVersion
in interface VersionHierarchy
version
- - the version numberpublic void addVersion(String versionStr)
VersionHierarchy
#convertVersion(String, String)
for conversion.
addVersion
in interface VersionHierarchy
versionStr
- - as a text string separating the version number parts by a separator#convertVersion(String, String)
public void addVersion(List<String> version)
VersionHierarchy
addVersion
in interface VersionHierarchy
version
- - as a list containing the version number partspublic List<String> convertVersion(String versionStr)
convertVersion
in interface VersionHierarchy
public boolean isCompatible(VersionNumber version)
VersionHierarchy
true
if the version is compatible with the known versions.
isCompatible
in interface VersionHierarchy
version
- - the version number
true
if the version is compatible with the known versions
, otherwise false
.public boolean isCompatible(String versionStr)
VersionHierarchy
true
if the version is compatible with the known versions.
Uses the #convertVersion(String, String)
for conversion.
isCompatible
in interface VersionHierarchy
versionStr
- - the version number
true
if the version is compatible with the known versions
, otherwise false
.public boolean isCompatible(List<String> version)
VersionHierarchy
true
if the version is compatible with the known versions.
isCompatible
in interface VersionHierarchy
version
- - the version number
true
if the version is compatible with the known versions
, otherwise false
.public String toString()
toString
in class Object
public List<String> getRegisteredVersionAsStings()
VersionHierarchy
getRegisteredVersionAsStings
in interface VersionHierarchy
public List<VersionNumber> getRegisteredVersionNumbers()
VersionHierarchy
VersionNumber
instances.
getRegisteredVersionNumbers
in interface VersionHierarchy
VersionNumber
instances.public void accept(VersionNumberVisitor visitor)
VersionNumberVisitorAcceptor
accept
in interface VersionNumberVisitorAcceptor
visitor
- - the version number visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |