本文整理了Java中aQute.bnd.version.Version.equals()
方法的一些代码示例,展示了Version.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.equals()
方法的具体详情如下:
包路径:aQute.bnd.version.Version
类名称:Version
方法名:equals
暂无
代码示例来源:origin: biz.aQute.bnd/bndlib
public VersionRange(Version low, Version higher) {
this.low = low;
this.high = higher;
start = '[';
end = this.low.equals(this.high) ? ']' : ')';
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
static Version unique(Version v) {
if (Version.HIGHEST.equals(v))
return Version.HIGHEST;
if (Version.LOWEST.equals(v))
return Version.LOWEST;
return v;
}
代码示例来源:origin: biz.aQute.bnd/bnd
public VersionRange(Version low, Version higher) {
this.low = low;
this.high = higher;
start = '[';
end = this.low.equals(this.high) ? ']' : ')';
}
代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle
static Version unique(Version v) {
if (Version.HIGHEST.equals(v))
return Version.HIGHEST;
if (Version.LOWEST.equals(v))
return Version.LOWEST;
return v;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
static Version unique(Version v) {
if (Version.HIGHEST.equals(v))
return Version.HIGHEST;
if (Version.LOWEST.equals(v))
return Version.LOWEST;
return v;
}
代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension
static Version unique(Version v) {
if (Version.HIGHEST.equals(v))
return Version.HIGHEST;
if (Version.LOWEST.equals(v))
return Version.LOWEST;
return v;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public VersionRange(Version low, Version higher) {
this.low = low;
this.high = unique(higher);
start = '[';
end = this.low.equals(this.high) ? ']' : ')';
}
代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension
public VersionRange(Version low, Version higher) {
this.low = low;
this.high = unique(higher);
start = '[';
end = this.low.equals(this.high) ? ']' : ')';
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public VersionRange(Version low, Version higher) {
this.low = low;
this.high = unique(higher);
start = '[';
end = this.low.equals(this.high) ? ']' : ')';
}
代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle
public VersionRange(Version low, Version higher) {
this.low = low;
this.high = unique(higher);
start = '[';
end = this.low.equals(this.high) ? ']' : ')';
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
static Expression make(String key, SimpleExpression low, SimpleExpression high) {
if (key.contains("version")) {
try {
Version a = Version.parseVersion(low.value);
Version b = Version.parseVersion(high.value);
if (a.compareTo(b) > 0)
return FALSE;
if (a.equals(Version.LOWEST) && b.equals(Version.HIGHEST))
return TRUE;
if (b.equals(Version.HIGHEST))
return low;
if (a.equals(Version.LOWEST))
return high;
} catch (Exception e) {
// ignore, might not be a version
}
}
return new RangeExpression(key, low, high);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
static Expression make(String key, SimpleExpression low, SimpleExpression high) {
if (key.contains("version")) {
try {
Version a = Version.parseVersion(low.value);
Version b = Version.parseVersion(high.value);
if (a.compareTo(b) > 0)
return FALSE;
if (a.equals(Version.LOWEST) && b.equals(Version.HIGHEST))
return TRUE;
if (b.equals(Version.HIGHEST))
return low;
if (a.equals(Version.LOWEST))
return high;
} catch (Exception e) {
// ignore, might not be a version
}
}
return new RangeExpression(key, low, high);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
static MetatypeVersion valueFor(String s) {
Version v = new Version(s);
for (MetatypeVersion mv : values()) {
if (mv.value.equals(v)) {
return mv;
}
}
throw new IllegalArgumentException("No MetatypeVersion for " + v);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
static MetatypeVersion valueFor(String s) {
Version v = new Version(s);
for (MetatypeVersion mv : values()) {
if (mv.value.equals(v)) {
return mv;
}
}
throw new IllegalArgumentException("No MetatypeVersion for " + v);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
protected File getLocal(String bsn, Version version, Map<String, String> properties) {
File dir = new File(root, bsn);
if (LATEST_VERSION.equals(version)) {
File fjar = new File(dir, bsn + LATEST_POSTFIX);
if (fjar.isFile())
return fjar.getAbsoluteFile();
}
File fjar = new File(dir, bsn + "-" + version.toStringWithoutQualifier() + ".jar");
if (fjar.isFile())
return fjar.getAbsoluteFile();
File sfjar = new File(dir, version.toStringWithoutQualifier() + ".jar");
if (sfjar.isFile())
return sfjar.getAbsoluteFile();
File flib = new File(dir, bsn + "-" + version.toStringWithoutQualifier() + ".lib");
if (flib.isFile())
return flib.getAbsoluteFile();
File sflib = new File(dir, version.toStringWithoutQualifier() + ".lib");
if (sflib.isFile())
return sflib.getAbsoluteFile();
return fjar.getAbsoluteFile();
}
代码示例来源:origin: biz.aQute/bndlib
private boolean matchVersion(String range, Version version, boolean exact) {
if (range == null || range.trim().length() == 0)
return true;
VersionRange vr = new VersionRange(range);
boolean result;
if (exact) {
if (vr.isRange())
result = false;
else
result = vr.getHigh().equals(version);
} else {
result = vr.includes(version);
}
return result;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
private boolean matchVersion(String range, Version version, boolean exact) {
if (range == null || range.trim().length() == 0)
return true;
VersionRange vr = new VersionRange(range);
boolean result;
if (exact) {
if (vr.isRange())
result = false;
else
result = vr.getHigh().equals(version);
} else {
result = vr.includes(version);
}
return result;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private boolean matchVersion(String range, Version version, boolean exact) {
if (range == null || range.trim()
.length() == 0)
return true;
VersionRange vr = new VersionRange(range);
boolean result;
if (exact) {
if (vr.isRange())
result = false;
else
result = vr.getHigh()
.equals(version);
} else {
result = vr.includes(version);
}
return result;
}
代码示例来源:origin: biz.aQute.bnd/bnd
private boolean matchVersion(String range, Version version, boolean exact) {
if (range == null || range.trim().length() == 0)
return true;
VersionRange vr = new VersionRange(range);
boolean result;
if (exact) {
if (vr.isRange())
result = false;
else
result = vr.getHigh().equals(version);
} else {
result = vr.includes(version);
}
return result;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private boolean matchVersion(String range, Version version, boolean exact) {
if (range == null || range.trim()
.length() == 0)
return true;
VersionRange vr = new VersionRange(range);
boolean result;
if (exact) {
if (vr.isRange())
result = false;
else
result = vr.getHigh()
.equals(version);
} else {
result = vr.includes(version);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!