X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fa2%2FA2Module.java;fp=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fa2%2FA2Module.java;h=0000000000000000000000000000000000000000;hb=b7d8618ce593bbeca7e311d32a4d98988e27f877;hp=77f81d130b1379b43f48e41ae2a1e3c36a2d0d9d;hpb=25a31ea46e5de6ce0de366fdb999588c6788c540;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.osgi.boot/src/org/argeo/osgi/a2/A2Module.java b/org.argeo.osgi.boot/src/org/argeo/osgi/a2/A2Module.java deleted file mode 100644 index 77f81d130..000000000 --- a/org.argeo.osgi.boot/src/org/argeo/osgi/a2/A2Module.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.argeo.osgi.a2; - -import org.osgi.framework.Version; - -/** - * An identified software package. In OSGi's case this is the combination of - * Bundle-SymbolicName and Bundle-version. This is the - * equivalent of the full coordinates of a Maven artifact version. - */ -class A2Module implements Comparable { - private final A2Branch branch; - private final Version version; - private final Object locator; - - public A2Module(A2Branch branch, Version version, Object locator) { - this.branch = branch; - this.version = version; - this.locator = locator; - branch.modules.put(version, this); - } - - A2Branch getBranch() { - return branch; - } - - Version getVersion() { - return version; - } - - Object getLocator() { - return locator; - } - - @Override - public int compareTo(A2Module o) { - return version.compareTo(o.version); - } - - @Override - public int hashCode() { - return version.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof A2Module) { - A2Module o = (A2Module) obj; - return branch.equals(o.branch) && version.equals(o.version); - } else - return false; - } - - @Override - public String toString() { - return getCoordinates(); - } - - public String getCoordinates() { - return branch.getComponent() + ":" + version; - } - -}