org.locationtech.geogig.model.Ref.isChild()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(185)

本文整理了Java中org.locationtech.geogig.model.Ref.isChild方法的一些代码示例,展示了Ref.isChild的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ref.isChild方法的具体详情如下:
包路径:org.locationtech.geogig.model.Ref
类名称:Ref
方法名:isChild

Ref.isChild介绍

[英]Determines if the ref is a child of parent
[中]确定ref是否是父对象的子对象

代码示例

代码示例来源:origin: locationtech/geogig

  1. @Override
  2. public boolean apply(Ref r) {
  3. return Ref.isChild(remotePrefix, r.getName());
  4. }};

代码示例来源:origin: locationtech/geogig

  1. public Optional<String> mapToRemote(final String local) {
  2. Preconditions.checkNotNull(local);
  3. String remoteRef = null;
  4. if (isAllChildren()) {
  5. if (Ref.isChild(this.localRef, local)) {
  6. final String localRefName = local.substring(this.localRef.length());
  7. remoteRef = Ref.append(this.remoteRef, localRefName);
  8. }
  9. } else {
  10. if (local.equals(this.localRef)) {
  11. remoteRef = this.remoteRef;
  12. }
  13. }
  14. return Optional.ofNullable(remoteRef);
  15. }

代码示例来源:origin: locationtech/geogig

  1. public Optional<String> mapToLocal(final String remoteRef) {
  2. Preconditions.checkNotNull(remoteRef);
  3. String localRef = null;
  4. if (isAllChildren()) {
  5. if (Ref.isChild(this.remoteRef, remoteRef)) {
  6. final String remoteRefName = remoteRef.substring(this.remoteRef.length());
  7. localRef = Ref.append(this.localRef, remoteRefName);
  8. }
  9. } else {
  10. if (remoteRef.equals(this.remoteRef)) {
  11. localRef = this.localRef;
  12. }
  13. }
  14. return Optional.ofNullable(localRef);
  15. }

代码示例来源:origin: locationtech/geogig

  1. protected Ref _call() {
  2. checkState(branchName != null, "branch name was not provided");
  3. final String branchRefPath;
  4. if (Ref.isChild(Ref.HEADS_PREFIX, branchName)) {
  5. branchRefPath = branchName;
  6. } else {

相关文章