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


Java ComparatorUtil.equalsNullable方法代码示例

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


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

示例1: shouldUpdate

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
private static <T> boolean shouldUpdate(@NotNull JComboBox comboBox, @NotNull List<T> newItems) {
  int count = comboBox.getItemCount();
  if (newItems.size() != count) {
    return true;
  }
  for (int i = 0; i < count; i++) {
    Object oldItem = comboBox.getItemAt(i);
    T newItem = newItems.get(i);
    if (!ComparatorUtil.equalsNullable(oldItem, newItem)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:SwingHelper.java

示例2: updateSelectedDeveloper

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
private void updateSelectedDeveloper() {
  myProcessEvents = false;

  Integer index = null;
  for (int i = 0; i < myAssigneeComboBox.getItemCount(); i++) {
    Developer developer = (Developer) myAssigneeComboBox.getItemAt(i);
    if (ComparatorUtil.equalsNullable(developer.getId(), myAssigneeId)) {
      index = i;
      break;
    }
  }
  setSelectedAssigneeIndex(index);

  myProcessEvents = true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:DetailsTabForm.java

示例3: isModified

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
public boolean isModified(AbstractPyCommonOptionsForm form) {
  return !ComparatorUtil.equalsNullable(mySdkHome, form.getSdkHome()) ||
         !myInterpreterOptions.equals(form.getInterpreterOptions()) ||
         !myEnvs.equals(form.getEnvs()) ||
         myUseModuleSdk != form.isUseModuleSdk() ||
         myAddContentRoots != form.shouldAddContentRoots() ||
         myAddSourceRoots != form.shouldAddSourceRoots()
         || !ComparatorUtil.equalsNullable(myModuleName, form.getModule() == null ? null : form.getModule().getName())
         || !myWorkingDirectory.equals(form.getWorkingDirectory())
         || !myMappings.equals(form.getMappingSettings());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:PyConsoleOptions.java

示例4: activate

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
public void activate() {
  if (!myRunState) {
    start();
    if (!ComparatorUtil.equalsNullable(myContent, myDesigner.getEditorText()) || myDesigner.getRootComponent() == null) {
      myUpdateRenderer = false;
      addRequest();
    }
    myContent = null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ExternalPSIChangeListener.java

示例5: getHashColor

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
@Override
protected Color getHashColor() {
  if (invertLineColor && !ComparatorUtil.equalsNullable(UIUtil.getTreeSelectionForeground(), UIUtil.getTreeForeground())) {
    final Color c = UIUtil.getTreeSelectionForeground();
    if (c != null) {
      return c.darker();
    }
  }
  return super.getHashColor();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:WideSelectionTreeUI.java

示例6: activate

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
public void activate() {
    if (!myRunState) {
        start();
        if (!ComparatorUtil.equalsNullable(myContent, myDesigner.getEditorText()) || myDesigner.getRootComponent() == null) {
            myUpdateRenderer = false;
            addRequest();
        }
        myContent = null;
    }
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:11,代码来源:ExternalPSIChangeListener.java

示例7: equals

import com.intellij.util.containers.ComparatorUtil; //导入方法依赖的package包/类
@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;

  AnnotationConfig that = (AnnotationConfig) o;

  if (!ComparatorUtil.equalsNullable(myAnnotation, that.myAnnotation)) return false;
  if (!ComparatorUtil.equalsNullable(myElement, that.myElement)) return false;

  return true;
}
 
开发者ID:VladRassokhin,项目名称:intellij-tasks-navigate,代码行数:13,代码来源:AnnotationConfig.java


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