当前位置: 首页>>代码示例>>Java>>正文


Java Key.equals方法代码示例

本文整理汇总了Java中com.intellij.openapi.externalSystem.model.Key.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Key.equals方法的具体用法?Java Key.equals怎么用?Java Key.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.externalSystem.model.Key的用法示例。


在下文中一共展示了Key.equals方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getChildren

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@NotNull
public static <T> Collection<DataNode<T>> getChildren(@NotNull DataNode<?> node, @NotNull Key<T> key) {
  Collection<DataNode<T>> result = null;
  for (DataNode<?> child : node.getChildren()) {
    if (!key.equals(child.getKey())) {
      continue;
    }
    if (result == null) {
      result = ContainerUtilRt.newArrayList();
    }
    result.add((DataNode<T>)child);
  }
  return result == null ? Collections.<DataNode<T>>emptyList() : result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ExternalSystemApiUtil.java

示例2: find

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Nullable
public static <T> DataNode<T> find(@NotNull DataNode<?> node, @NotNull Key<T> key) {
  for (DataNode<?> child : node.getChildren()) {
    if (key.equals(child.getKey())) {
      return (DataNode<T>)child;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ExternalSystemApiUtil.java

示例3: findParent

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Nullable
public static <T> DataNode<T> findParent(@NotNull DataNode<?> node,
                                         @NotNull Key<T> key,
                                         @Nullable BooleanFunction<DataNode<T>> predicate) {
  DataNode<?> parent = node.getParent();
  if (parent == null) return null;
  return key.equals(parent.getKey()) && (predicate == null || predicate.fun((DataNode<T>)parent))
         ? (DataNode<T>)parent : findParent(parent, key, predicate);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ExternalSystemApiUtil.java

示例4: findAll

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@NotNull
public static <T> Collection<DataNode<T>> findAll(@NotNull DataNode<?> parent, @NotNull Key<T> key) {
  Collection<DataNode<T>> result = null;
  for (DataNode<?> child : parent.getChildren()) {
    if (!key.equals(child.getKey())) {
      continue;
    }
    if (result == null) {
      result = ContainerUtilRt.newArrayList();
    }
    result.add((DataNode<T>)child);
  }
  return result == null ? Collections.<DataNode<T>>emptyList() : result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ExternalSystemApiUtil.java

示例5: isSameNode

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public boolean isSameNode(@NotNull DataNode<?> node1, @NotNull DataNode<?> node2, @NotNull Project project) {
  Key<?> key = node1.getKey();
  if (!key.equals(node2.getKey())) {
    return false;
  }
  EqualityStrategy strategy = myStrategies.get(key);
  if (strategy == null) {
    return node1.getData().equals(node2.getData());
  }
  return strategy.isSameData(node1.getData(), node2.getData(), project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SyncEntityDataComparisonStrategy.java

示例6: getChildren

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Nonnull
public static <T> Collection<DataNode<T>> getChildren(@Nonnull DataNode<?> node, @Nonnull Key<T> key) {
  Collection<DataNode<T>> result = null;
  for (DataNode<?> child : node.getChildren()) {
    if (!key.equals(child.getKey())) {
      continue;
    }
    if (result == null) {
      result = ContainerUtilRt.newArrayList();
    }
    result.add((DataNode<T>)child);
  }
  return result == null ? Collections.<DataNode<T>>emptyList() : result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:ExternalSystemApiUtil.java

示例7: find

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Nullable
public static <T> DataNode<T> find(@Nonnull DataNode<?> node, @Nonnull Key<T> key) {
  for (DataNode<?> child : node.getChildren()) {
    if (key.equals(child.getKey())) {
      return (DataNode<T>)child;
    }
  }
  return null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:ExternalSystemApiUtil.java

示例8: findParent

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Nullable
public static <T> DataNode<T> findParent(@Nonnull DataNode<?> node, @Nonnull Key<T> key, @javax.annotation.Nullable BooleanFunction<DataNode<T>> predicate) {
  DataNode<?> parent = node.getParent();
  if (parent == null) return null;
  return key.equals(parent.getKey()) && (predicate == null || predicate.fun((DataNode<T>)parent)) ? (DataNode<T>)parent : findParent(parent, key, predicate);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:ExternalSystemApiUtil.java

示例9: findAll

import com.intellij.openapi.externalSystem.model.Key; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Nonnull
public static <T> Collection<DataNode<T>> findAll(@Nonnull DataNode<?> parent, @Nonnull Key<T> key) {
  Collection<DataNode<T>> result = null;
  for (DataNode<?> child : parent.getChildren()) {
    if (!key.equals(child.getKey())) {
      continue;
    }
    if (result == null) {
      result = ContainerUtilRt.newArrayList();
    }
    result.add((DataNode<T>)child);
  }
  return result == null ? Collections.<DataNode<T>>emptyList() : result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:ExternalSystemApiUtil.java


注:本文中的com.intellij.openapi.externalSystem.model.Key.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。