• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TIntObjectProcedure类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中gnu.trove.TIntObjectProcedure的典型用法代码示例。如果您正苦于以下问题:Java TIntObjectProcedure类的具体用法?Java TIntObjectProcedure怎么用?Java TIntObjectProcedure使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: ContextRelevantStaticMethod

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public ContextRelevantStaticMethod(final PsiMethod psiMethod, @Nullable final TIntObjectHashMap<PsiVariable> parameters) {
  this.psiMethod = psiMethod;
  if (parameters == null) {
    this.parameters = null;
  } else {
    this.parameters = new TIntObjectHashMap<SubLookupElement>(parameters.size());
    parameters.forEachEntry(new TIntObjectProcedure<PsiVariable>() {
      @SuppressWarnings("ConstantConditions")
      @Override
      public boolean execute(final int pos, final PsiVariable var) {
        ContextRelevantStaticMethod.this.parameters.put(pos, new VariableSubLookupElement(var));
        return true;
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ContextRelevantStaticMethod.java


示例2: toString

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public String toString() {
  @NonNls final StringBuilder s = new StringBuilder();
  s.append("defensivelyMarked = ").append(defensivelyMarked);
  s.append("; wolfPassFinfished = ").append(wolfPassFinished);
  s.append("; errorFound = ").append(errorFound);
  s.append("; dirtyScopes: (");
  dirtyScopes.forEachEntry(new TIntObjectProcedure<RangeMarker>() {
    @Override
    public boolean execute(int passId, RangeMarker rangeMarker) {
      s.append(" pass: ").append(passId).append(" -> ").append(rangeMarker == WHOLE_FILE_DIRTY_MARKER ? "Whole file" : rangeMarker).append(";");
      return true;
    }
  });
  s.append(")");
  return s.toString();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:FileStatusMap.java


示例3: removeAllDataAtOrAfter

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
/**
 * Removes data for all tabs and fold regions that start at or after the given offset.
 * 
 * @param offset  target offset
 */
public void removeAllDataAtOrAfter(final int offset) {
  if (myFoldingData != DUMMY && !myFoldingData.isEmpty()) {
    myFoldingData.retainEntries(new TIntObjectProcedure<FoldingData>() {
      @Override
      public boolean execute(int a, FoldingData b) {
        return a < offset;
      }
    });
  }
  int i;
  for (i = 0; i < myTabPositions.size(); i++) {
    if (myTabPositions.get(i).offset >= offset) {
      break;
    }
  }
  myTabPositions.subList(i, myTabPositions.size()).clear();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CacheEntry.java


示例4: checkTimeout

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public void checkTimeout() {
  LOG.debug("Checking timeout");
  final List<TimeoutHandler> timedOut = new ArrayList<TimeoutHandler>();
  synchronized (myLock) {
    final long time = System.currentTimeMillis();
    myTimeoutHandlers.retainEntries(new TIntObjectProcedure<TimeoutHandler>() {
      public boolean execute(int a, TimeoutHandler b) {
        if (time > b.myLastTime) {
          timedOut.add(b);
          return false;
        }
        return true;
      }
    });
  }
  for (TimeoutHandler handler : timedOut) {
    LOG.debug("performing timeout action: " + handler.myAction);
    handler.myAction.run();
  }
  scheduleTimeoutCheck();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ResponseProcessor.java


示例5: ContextRelevantStaticMethod

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public ContextRelevantStaticMethod(final PsiMethod psiMethod, @Nullable final TIntObjectHashMap<PsiVariable> parameters) {
  this.psiMethod = psiMethod;
  if (parameters == null) {
    this.parameters = null;
  } else {
    this.parameters = new TIntObjectHashMap<SubLookupElement>(parameters.size());
    parameters.forEachEntry(new TIntObjectProcedure<PsiVariable>() {
      @SuppressWarnings("ConstantConditions")
      @Override
      public boolean execute(final int pos, final PsiVariable var) {
        ContextRelevantStaticMethod.this.parameters.put(pos, new VariableSubLookupElement(var));
        return false;
      }
    });
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:ContextRelevantStaticMethod.java


示例6: merge

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public void merge(DefinitionMap map2) {
  map2.myMap.forEachEntry(new TIntObjectProcedure<TIntHashSet>() {
    public boolean execute(int num, TIntHashSet defs) {
      TIntHashSet defs2 = myMap.get(num);
      if (defs2 == null) {
        defs2 = new TIntHashSet(defs.toArray());
        myMap.put(num, defs2);
      }
      else {
        defs2.addAll(defs.toArray());
      }

      return true;
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:DefinitionMap.java


示例7: collectMyElements

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
protected List<StructureViewTreeElement> collectMyElements(final Set<String> referencedNamedIds)
{
	final TIntObjectHashMap<PsiElement> offset2Element = new TIntObjectHashMap<PsiElement>();

	collectChildrenFromElement(myElement, referencedNamedIds, offset2Element);


	final List<StructureViewTreeElement> children = new ArrayList<StructureViewTreeElement>(offset2Element.size());
	offset2Element.forEachEntry(new TIntObjectProcedure<PsiElement>()
	{
		@Override
		public boolean execute(int textOffset, PsiElement element)
		{
			children.add(createStructureViewElement(element));
			return true;
		}
	});
	return children;
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:20,代码来源:JSStructureViewElement.java


示例8: toString

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public String toString()
{
	final StringBuilder s = new StringBuilder("{");
	forEachEntry(new TIntObjectProcedure<int[]>()
	{
		@Override
		public boolean execute(int id, int[] set)
		{
			DfaValue value = myFactory.getValue(id);
			s.append(value).append(" -> ").append(Arrays.toString(set)).append(", ");
			return true;
		}
	});
	s.append("}");
	return s.toString();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:DfaMemoryStateImpl.java


示例9: eq

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public boolean eq(final TIntObjectHashMap<TIntHashSet> m1, final TIntObjectHashMap<TIntHashSet> m2) {
  if (m1.size() != m2.size()) return false;

  return m1.forEachEntry(new TIntObjectProcedure<TIntHashSet>() {
    public boolean execute(int num, TIntHashSet defs1) {
      final TIntHashSet defs2 = m2.get(num);
      return defs2 != null && defs2.equals(defs1);
    }
  });
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:11,代码来源:ReachingDefinitionsSemilattice.java


示例10: putAll

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public void putAll(IntIntMultiMaplet m) {
  m.forEachEntry(new TIntObjectProcedure<TIntHashSet>() {
    @Override
    public boolean execute(int key, TIntHashSet value) {
      put(key, value);
      return true;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:IntIntPersistentMultiMaplet.java


示例11: replaceAll

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public void replaceAll(IntIntMultiMaplet m) {
  m.forEachEntry(new TIntObjectProcedure<TIntHashSet>() {
    @Override
    public boolean execute(int key, TIntHashSet value) {
      replace(key, value);
      return true;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:IntIntPersistentMultiMaplet.java


示例12: putAll

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public void putAll(IntIntMultiMaplet m) {
  m.forEachEntry(new TIntObjectProcedure<TIntHashSet>() {
    @Override
    public boolean execute(int key, TIntHashSet values) {
      put(key, values);
      return true;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:IntIntTransientMultiMaplet.java


示例13: putAll

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public void putAll(IntObjectMultiMaplet<V> m) {
  m.forEachEntry(new TIntObjectProcedure<Collection<V>>() {
    @Override
    public boolean execute(int key, Collection<V> value) {
      put(key, value);
      return true;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:IntObjectTransientMultiMaplet.java


示例14: replaceAll

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public void replaceAll(IntObjectMultiMaplet<V> m) {
  m.forEachEntry(new TIntObjectProcedure<Collection<V>>() {
    @Override
    public boolean execute(int key, Collection<V> value) {
      replace(key, value);
      return true;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:IntObjectTransientMultiMaplet.java


示例15: clone

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
protected CacheEntry clone() {
  final CacheEntry result = new CacheEntry(visualLine, myEditor);

  result.startLogicalLine = startLogicalLine;
  result.startLogicalColumn = startLogicalColumn;
  result.startOffset = startOffset;
  result.startSoftWrapLinesBefore = startSoftWrapLinesBefore;
  result.startSoftWrapLinesCurrent = startSoftWrapLinesCurrent;
  result.startSoftWrapColumnDiff = startSoftWrapColumnDiff;
  result.startFoldedLines = startFoldedLines;
  result.startFoldingColumnDiff = startFoldingColumnDiff;

  result.endOffset = endOffset;
  result.endLogicalLine = endLogicalLine;
  result.endLogicalColumn = endLogicalColumn;
  result.endVisualColumn = endVisualColumn;
  result.endSoftWrapLinesBefore = endSoftWrapLinesBefore;
  result.endSoftWrapLinesCurrent = endSoftWrapLinesCurrent;
  result.endSoftWrapColumnDiff = endSoftWrapColumnDiff;
  result.endFoldedLines = endFoldedLines;
  result.endFoldingColumnDiff = endFoldingColumnDiff;

  myFoldingData.forEachEntry(new TIntObjectProcedure<FoldingData>() {
    @Override
    public boolean execute(int offset, FoldingData foldData) {
      result.store(foldData, offset);
      return true;
    }
  });
  for (TabData tabPosition : myTabPositions) {
    result.storeTabData(tabPosition);
  }

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


示例16: checkConsistencyWithFoldingsAndTabs

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
private static void checkConsistencyWithFoldingsAndTabs(CacheEntry entry) {
  Map<Integer, FoldRegion> actualFoldRegions = new HashMap<Integer, FoldRegion>();
  List<Integer> actualTabPositions = new ArrayList<Integer>();
  for (int i = entry.startOffset; i < entry.endOffset; i++) {
    FoldRegion region = myEditor.getFoldingModel().getCollapsedRegionAtOffset(i);
    if (region == null) {
      if (myEditor.getDocument().getCharsSequence().charAt(i) == '\t') {
        actualTabPositions.add(i);
      }
    }
    else {
      if (region.getStartOffset() == i) {
        actualFoldRegions.put(i, region);
      }
    }
  }
  final Map<Integer, FoldRegion> cachedFoldRegions = new HashMap<Integer, FoldRegion>();
  entry.getFoldingData().forEachEntry(new TIntObjectProcedure<FoldingData>() {
    @Override
    public boolean execute(int offset, FoldingData data) {
      cachedFoldRegions.put(offset, data.getFoldRegion());
      return true;
    }
  });
  assertEquals(actualFoldRegions, cachedFoldRegions);
  List<Integer> cachedTabPositions = new ArrayList<Integer>();
  for (TabData tabData : entry.getTabData()) {
    cachedTabPositions.add(tabData.offset);
  }
  assertEquals(actualTabPositions, cachedTabPositions);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:SoftWrapStressTest.java


示例17: toString

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
public String toString() {
  final StringBuilder s = new StringBuilder();
  forEachEntry(new TIntObjectProcedure<Object>() {
    @Override
    public boolean execute(int key, Object value) {
      s.append(s.length() == 0 ? "" : ", ").append(Key.getKeyByIndex(key)).append(" -> ").append(value);
      return true;
    }
  });
  return "[" + s.toString() + "]";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:MapBackedFMap.java


示例18: eq

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public boolean eq(final DefinitionMap m2) {
  if (myMap.size() != m2.myMap.size()) return false;

  return myMap.forEachEntry(new TIntObjectProcedure<TIntHashSet>() {
    @Override
    public boolean execute(int num, TIntHashSet defs1) {
      final TIntHashSet defs2 = m2.myMap.get(num);
      return defs2 != null && defs2.equals(defs1);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DefinitionMap.java


示例19: getBreakpoints

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
public synchronized List<Breakpoint> getBreakpoints() {
  final ArrayList<Breakpoint> breakpoints = new ArrayList<Breakpoint>();
  myBreakpoints.forEachEntry(new TIntObjectProcedure<Map<String, Breakpoint>>() {
    public boolean execute(int i, Map<String, Breakpoint> map) {
      breakpoints.addAll(map.values());
      return true;
    }
  });
  return breakpoints;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:BreakpointManagerImpl.java


示例20: putAll

import gnu.trove.TIntObjectProcedure; //导入依赖的package包/类
@Override
void putAll(IntObjectMaplet<V> m) {
  m.forEachEntry(new TIntObjectProcedure<V>() {
    @Override
    public boolean execute(int key, V value) {
      myMap.put(key, value);
      return true;
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:IntObjectTransientMaplet.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TriangulationPoint类代码示例发布时间:2022-05-23
下一篇:
Java InvalidTicketException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap