本文整理了Java中org.locationtech.geogig.model.Ref.isChild
方法的一些代码示例,展示了Ref.isChild
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ref.isChild
方法的具体详情如下:
包路径:org.locationtech.geogig.model.Ref
类名称:Ref
方法名:isChild
[英]Determines if the ref is a child of parent
[中]确定ref是否是父对象的子对象
代码示例来源:origin: locationtech/geogig
@Override
public boolean apply(Ref r) {
return Ref.isChild(remotePrefix, r.getName());
}};
代码示例来源:origin: locationtech/geogig
public Optional<String> mapToRemote(final String local) {
Preconditions.checkNotNull(local);
String remoteRef = null;
if (isAllChildren()) {
if (Ref.isChild(this.localRef, local)) {
final String localRefName = local.substring(this.localRef.length());
remoteRef = Ref.append(this.remoteRef, localRefName);
}
} else {
if (local.equals(this.localRef)) {
remoteRef = this.remoteRef;
}
}
return Optional.ofNullable(remoteRef);
}
代码示例来源:origin: locationtech/geogig
public Optional<String> mapToLocal(final String remoteRef) {
Preconditions.checkNotNull(remoteRef);
String localRef = null;
if (isAllChildren()) {
if (Ref.isChild(this.remoteRef, remoteRef)) {
final String remoteRefName = remoteRef.substring(this.remoteRef.length());
localRef = Ref.append(this.localRef, remoteRefName);
}
} else {
if (remoteRef.equals(this.remoteRef)) {
localRef = this.localRef;
}
}
return Optional.ofNullable(localRef);
}
代码示例来源:origin: locationtech/geogig
protected Ref _call() {
checkState(branchName != null, "branch name was not provided");
final String branchRefPath;
if (Ref.isChild(Ref.HEADS_PREFIX, branchName)) {
branchRefPath = branchName;
} else {
内容来源于网络,如有侵权,请联系作者删除!