public class RuntimeEnvironment extends Object implements Comparable
java -cp target/taverna-external-tool-activity-2.1.0-incubating-SNAPSHOT.jar org.apache.taverna.activities.externaltool.desc.RuntimeEnvironment compare bla-1 foo-1 java -cp target/taverna-external-tool-activity-2.1.0-incubating-SNAPSHOT.jar org.apache.taverna.activities.externaltool.desc.RuntimeEnvironment compare bla-1 bla-2 java -cp target/taverna-external-tool-activity-2.1.0-incubating-SNAPSHOT.jar org.apache.taverna.activities.externaltool.desc.RuntimeEnvironment compare bla-1.2 bla-1
Modifier and Type | Field and Description |
---|---|
protected String |
id
Unique identification of the runtime environment - the full name
|
protected String |
name |
protected String |
version |
Constructor and Description |
---|
RuntimeEnvironment(String raw)
Parses a string as commonly presented by the infosystem
|
Modifier and Type | Method and Description |
---|---|
boolean |
atLeastAsCapableAs(RuntimeEnvironment re)
Indicates if a runtime environment has the same name, and if so, if the
given RE has the same or a later version.
|
boolean |
atLeastAsCapableAs(String s)
for those busy fellows who don't have the time to convert the String into
a RuntimeEnvironment object.
|
boolean |
atLeastAsCapableAsAnyOf(Iterable<RuntimeEnvironment> res)
Indicates if this runtimeEnvironment is the same version or later as any
in that list.
|
int |
compareTo(Object o)
Implementation of Comparable interface.
|
static int |
compareVersions(String a,
String b)
FIXME: For the sake of simplicity, this implementation makes an error in
treating .
|
String |
getID()
Accessor function for the complete identifier of the runtime environment
|
String |
getName()
Accessor function for the RE's name
|
String |
getVersion()
Accessfor function for the version
|
boolean |
isInferiorToAtLeastOneIn(Iterable<RuntimeEnvironment> res)
Indicates if any of the runtime environments listed is the same version
as this or later.
|
static void |
main(String[] argv)
For testing purposes
|
String |
toString()
to make it behave like a string at time, as it was originally implemented
|
protected String id
protected String name
protected String version
public RuntimeEnvironment(String raw)
public String getID()
public String getName()
public String getVersion()
public boolean atLeastAsCapableAs(String s)
public boolean atLeastAsCapableAs(RuntimeEnvironment re)
public boolean atLeastAsCapableAsAnyOf(Iterable<RuntimeEnvironment> res)
public boolean isInferiorToAtLeastOneIn(Iterable<RuntimeEnvironment> res)
public String toString()
public int compareTo(Object o) throws ClassCastException
compareTo
in interface Comparable
ClassCastException
public static int compareVersions(String a, String b)
public static void main(String[] argv)
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.