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


Java Iterables.all方法代码示例

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


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

示例1: enclosedBy

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
@Override
public Ordering<Element> enclosedBy(Element element) {
  if (element instanceof ElementImpl &&
      Iterables.all(element.getEnclosedElements(), Predicates.instanceOf(ElementImpl.class))) {

    ElementImpl implementation = (ElementImpl) element;
    if (implementation._binding instanceof SourceTypeBinding) {
      SourceTypeBinding sourceBinding = (SourceTypeBinding) implementation._binding;

      return Ordering.natural().onResultOf(
          Functions.compose(bindingsToSourceOrder(sourceBinding), this));
    }
  }

  return DEFAULT_PROVIDER.enclosedBy(element);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:SourceOrdering.java

示例2: waitForCachedMaterialization

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
public void waitForCachedMaterialization(final AccelerationId id) throws Exception {

    for (int i = 0; i < 60; i++) {
      Thread.sleep(500);
      final List<Materialization> materializations = getMaterializations(id);

      final boolean allDone = Iterables.all(materializations, new Predicate<Materialization>() {
        @Override
        public boolean apply(@Nullable final Materialization input) {
          return getAccelerationService().isMaterializationCached(input.getId());
        }
      });

      if (allDone) {
        return ;
      }
    }

    Assert.fail("Timed out waiting for cached materializations");
  }
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:21,代码来源:AccelerationTestUtil.java

示例3: withProperty

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
public <V> IExtendedBlockState withProperty(IUnlistedProperty<V> property, V value)
{
    if(!this.unlistedProperties.containsKey(property))
    {
        throw new IllegalArgumentException("Cannot set unlisted property " + property + " as it does not exist in " + getBlock().getBlockState());
    }
    if(!property.isValid(value))
    {
        throw new IllegalArgumentException("Cannot set unlisted property " + property + " to " + value + " on block " + Block.REGISTRY.getNameForObject(getBlock()) + ", it is not an allowed value");
    }
    Map<IUnlistedProperty<?>, Optional<?>> newMap = new HashMap<IUnlistedProperty<?>, Optional<?>>(unlistedProperties);
    newMap.put(property, Optional.fromNullable(value));
    if(Iterables.all(newMap.values(), Predicates.<Optional<?>>equalTo(Optional.absent())))
    { // no dynamic properties, lookup normal state
        return (IExtendedBlockState) normalMap.get(getProperties());
    }
    return new ExtendedStateImplementation(getBlock(), getProperties(), ImmutableMap.copyOf(newMap), propertyValueTable).setMap(this.normalMap);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:ExtendedBlockState.java

示例4: allTypesKnown

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
private static boolean allTypesKnown(List<? extends DataType> keyTypes) {
    return Iterables.all(keyTypes, new Predicate<DataType>() {
        @Override
        public boolean apply(@Nullable DataType input) {
            return input != null && !input.equals(DataTypes.UNDEFINED);
        }
    });
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:9,代码来源:GroupingProjector.java

示例5: isRejected

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
@Override
public boolean isRejected(final IFolder folder) {
	return Iterables.all(contributions, c -> c.isRejected(folder));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:CompositeStorage2UriMapperContribution.java

示例6: validText

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
@Override
public boolean validText(ArgumentContext context) {
    return Iterables.all(COMMA_SPLITTER.limit(dimensions).split(context.text), number -> delegate.validText(context.withText(number)));
}
 
开发者ID:kenzierocks,项目名称:HardVox,代码行数:5,代码来源:VecArg.java

示例7: isEmpty

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
@Override
public boolean isEmpty() {
    return Iterables.all(subsets, Collection::isEmpty);
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:5,代码来源:SupersetView.java

示例8: readyToStart

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
/**
 * Determines whether or not the current match is ready to begin.
 *
 * @return Whether or not the current match is ready to begin.
 */
public boolean readyToStart() {
    return isReady(match.getDefaultParty()) &&
           Iterables.all(teamManager.getMappedTeams(),
                         ReadyManager.this::isReady);
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:11,代码来源:ReadyManager.java

示例9: validStreamers

import com.google.common.collect.Iterables; //导入方法依赖的package包/类
private static boolean validStreamers(Streamer<?>[] streamers) {
    if (streamers == null || streamers.length == 0) {
        return true;
    }
    return !Iterables.all(FluentIterable.of(streamers), Predicates.isNull());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:StreamBucket.java


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