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


Java TIntHashSet.isEmpty方法代码示例

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


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

示例1: removeMapping

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
public void removeMapping(Collection<String> outputPaths, int buildTargetId) throws IOException {
  if (outputPaths.isEmpty()) {
    return;
  }
  for (String outputPath : outputPaths) {
    final int key = FileUtil.pathHashCode(outputPath);
    synchronized (myDataLock) {
      final TIntHashSet state = getState(key);
      if (state != null) {
        final boolean removed = state.remove(buildTargetId);
        if (state.isEmpty()) {
          remove(key);
        }
        else {
          if (removed) {
            update(key, state);
          }
        }
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:OutputToTargetRegistry.java

示例2: removeAll

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
@Override
public void removeAll(int key, TIntHashSet values) {
  try {
    final TIntHashSet collection = myCache.get(key);

    if (collection != NULL_COLLECTION) {
      if (collection.removeAll(values.toArray())) {
        myCache.remove(key);
        if (collection.isEmpty()) {
          myMap.remove(key);
        }
        else {
          myMap.put(key, collection);
        }
      }
    }
  }
  catch (IOException e) {
    throw new BuildDataCorruptedException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:IntIntPersistentMultiMaplet.java

示例3: removeFrom

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
@Override
public void removeFrom(final int key, final int value) {
  try {
    final TIntHashSet collection = myCache.get(key);
    if (collection != NULL_COLLECTION) {
      if (collection.remove(value)) {
        myCache.remove(key);
        if (collection.isEmpty()) {
          myMap.remove(key);
        }
        else {
          myMap.put(key, collection);
        }
      }
    }
  }
  catch (IOException e) {
    throw new BuildDataCorruptedException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:IntIntPersistentMultiMaplet.java

示例4: removeAll

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
@Override
public void removeAll(int key, TIntHashSet values) {
  final TIntHashSet collection = myMap.get(key);
  if (collection != null) {
    values.forEach(new TIntProcedure() {
      @Override
      public boolean execute(int value) {
        collection.remove(value);
        return true;
      }
    });
    if (collection.isEmpty()) {
      myMap.remove(key);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:IntIntTransientMultiMaplet.java

示例5: StaticRank

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
public StaticRank(int trainSize, ClassificationScoreDB classification, TIntHashSet categoriesFilter) {
    this.trainSize = trainSize;
    this.classification = classification;
    this.testSize = classification.getDocumentCount();
    if (categoriesFilter == null || categoriesFilter.isEmpty()) {
        this.categoriesFilter = new TIntHashSet((int) (testSize + testSize * 0.25), (float) 0.75);
        for (short i = 0; i < classification.getDocumentScoresAsSet(0).size(); i++) {
            this.categoriesFilter.add(i);
        }
    } else {
        this.categoriesFilter = categoriesFilter;
    }
}
 
开发者ID:jatecs,项目名称:jatecs,代码行数:14,代码来源:StaticRank.java

示例6: replace

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
@Override
public void replace(int key, TIntHashSet value) {
  try {
    myCache.remove(key);
    if (value == null || value.isEmpty()) {
      myMap.remove(key);
    }
    else {
      myMap.put(key, value);
    }
  }
  catch (IOException e) {
    throw new BuildDataCorruptedException(e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:IntIntPersistentMultiMaplet.java

示例7: replace

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
@Override
public void replace(int key, TIntHashSet value) {
  if (value == null || value.isEmpty()) {
    myMap.remove(key);
  }
  else {
    myMap.put(key, value);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:IntIntTransientMultiMaplet.java

示例8: removeFrom

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
@Override
public void removeFrom(final int key, final int value) {
  final TIntHashSet collection = myMap.get(key);
  if (collection != null) {
    if (collection.remove(value)) {
      if (collection.isEmpty()) {
        myMap.remove(key);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:IntIntTransientMultiMaplet.java

示例9: satisfies

import gnu.trove.TIntHashSet; //导入方法依赖的package包/类
public boolean satisfies(final Usage usage) {
  if (usage instanceof AnnotationUsage) {
    final AnnotationUsage annotationUsage = (AnnotationUsage)usage;

    if (!myType.equals(annotationUsage.myType)) {
      return false;
    }

    boolean argumentsSatisfy = false;

    if (myUsedArguments != null) {
      final TIntHashSet arguments = new TIntHashSet(myUsedArguments.toArray());

      arguments.removeAll(annotationUsage.myUsedArguments.toArray());

      argumentsSatisfy = !arguments.isEmpty();
    }

    boolean targetsSatisfy = false;

    if (myUsedTargets != null) {
      final Collection<ElemType> targets = EnumSet.copyOf(myUsedTargets);

      targets.retainAll(annotationUsage.myUsedTargets);

      targetsSatisfy = !targets.isEmpty();
    }

    return argumentsSatisfy || targetsSatisfy;
  }

  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:UsageRepr.java


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