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


Java Predicates.alwaysFalse方法代码示例

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


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

示例1: OIDCCoreProtocolConfiguration

import com.google.common.base.Predicates; //导入方法依赖的package包/类
/**
 * Creates a new configuration instance.
 *
 * @param profileId Unique profile identifier.
 */
public OIDCCoreProtocolConfiguration(@Nonnull @NotEmpty final String profileId) {
    super(profileId);
    authenticationFlows = Collections.emptySet();
    postAuthenticationFlows = Collections.emptyList();
    defaultAuthenticationContexts = Collections.emptyList();
    nameIDFormatPrecedence = Collections.emptyList();
    signIDTokensPredicate = Predicates.alwaysTrue();
    pairwiseSubject = Predicates.alwaysFalse();
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:15,代码来源:OIDCCoreProtocolConfiguration.java

示例2: testFilteredEntriesObjectPredicate

import com.google.common.base.Predicates; //导入方法依赖的package包/类
public void testFilteredEntriesObjectPredicate() {
  Map<String, Integer> unfiltered = createUnfiltered();
  unfiltered.put("cat", 3);
  unfiltered.put("dog", 2);
  unfiltered.put("horse", 5);
  Predicate<Object> predicate = Predicates.alwaysFalse();
  Map<String, Integer> filtered
      = Maps.filterEntries(unfiltered, predicate);
  assertTrue(filtered.isEmpty());
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:11,代码来源:MapsTest.java

示例3: CraftiniumForgeTileEntity

import com.google.common.base.Predicates; //导入方法依赖的package包/类
public CraftiniumForgeTileEntity() {
    this.input = new ItemStackHandler(1);
    this.output = new SelectiveItemStackHandler(1, Predicates.alwaysFalse());
    this.fuel = new SelectiveItemStackHandler(1, TileEntityFurnace::isItemFuel);
    this.furnaceBurnTime = 0;
    this.currentItemBurnTime = 0;
    this.cookTime = 0;
    this.totalCookTime = 0;
    this.divisor = 1;
    this.brokenByCreative = false;
}
 
开发者ID:Randores,项目名称:Randores2,代码行数:12,代码来源:CraftiniumForgeTileEntity.java

示例4: build

import com.google.common.base.Predicates; //导入方法依赖的package包/类
/**
 * Builds a classifier based on previous allow/match decisions.
 * This may be reused after a call to build and subsequent calls to
 * allow/match methods will not affect previously built classifiers.
 */
public FragmentClassifier build() {
  Predicate<? super Optional<String>> fragmentClassifier = this.fragmentPred;
  UrlClassifier asRelativeUrlClassifier = this.asRelativeUrlPred;
  if (fragmentClassifier == null) {
    fragmentClassifier = Predicates.alwaysFalse();
  }
  if (asRelativeUrlClassifier == null) {
    asRelativeUrlClassifier = MATCH_NO_URLS;
  }
  return new FragmentClassifierImpl(fragmentClassifier, asRelativeUrlClassifier);
}
 
开发者ID:OWASP,项目名称:url-classifier,代码行数:17,代码来源:FragmentClassifierBuilder.java

示例5: build

import com.google.common.base.Predicates; //导入方法依赖的package包/类
/**
 * Builds a classifier based on previous allow/match decisions.
 * This may be reused after a call to build and subsequent calls to
 * allow/match methods will not affect previously built classifiers.
 */
public AuthorityClassifier build() {
  ImmutableSet<Inet4Address> ipv4Set = ipv4s.build();
  ImmutableSet<Inet6Address> ipv6Set = ipv6s.build();
  ImmutableSet<InternetDomainName> domainNameSet = domainNames.build();
  HostGlobMatcher hostGlobMatcher = new HostGlobMatcher(hostGlobs.build());
  int[] allowedPortsSorted;
  {
    ImmutableSet<Integer> allowedPortIntSet = allowedPorts.build();
    int n = allowedPortIntSet.size();
    allowedPortsSorted = new int[n];
    Iterator<Integer> allowedPortIt = allowedPortIntSet.iterator();
    for (int i = 0; i < n; ++i) {
      allowedPortsSorted[i] = allowedPortIt.next();
    }
    Arrays.sort(allowedPortsSorted);
  }
  Predicate<? super Integer> portClassifier =
      allowedPortsSorted.length == 0  // No exclusion specified
      ? Predicates.alwaysTrue()
      : Predicates.alwaysFalse();
  if (this.allowedPortClassifier != null) {
    portClassifier = this.allowedPortClassifier;
  }
  UserInfoClassifier userInfoClassifier =
      this.allowedUserInfoClassifier != null
      ? this.allowedUserInfoClassifier
      : UserInfoClassifiers.NO_PASSWORD_BUT_USERNAME_IF_ALLOWED_BY_SCHEME;
  return new AuthorityClassifierImpl(
      ipv4Set,
      ipv6Set,
      domainNameSet,
      hostGlobMatcher,
      matchesAnyHost,
      allowedPortsSorted,
      portClassifier,
      userInfoClassifier);
}
 
开发者ID:OWASP,项目名称:url-classifier,代码行数:43,代码来源:AuthorityClassifierBuilder.java

示例6: port

import com.google.common.base.Predicates; //导入方法依赖的package包/类
/**
 * If a port matcher is specified we assume default ports based on
 * scheme, so matching ports (80, 443) matches http://example.com/
 * but not https://example.com/ and https://example.com:80/ but not
 * https://example.com:10000/
 */
public AuthorityClassifierBuilder port(
    Predicate<? super Integer> portIsAllowed) {
  Preconditions.checkNotNull(portIsAllowed);
  if (allowedPortClassifier == null) {
    allowedPortClassifier = portIsAllowed;
  } else if (portIsAllowed != Predicates.alwaysFalse()) {  // x || false -> x
    allowedPortClassifier = Predicates.or(
        allowedPortClassifier, portIsAllowed);
  }
  return this;
}
 
开发者ID:OWASP,项目名称:url-classifier,代码行数:18,代码来源:AuthorityClassifierBuilder.java

示例7: getTeamCollisionPredicate

import com.google.common.base.Predicates; //导入方法依赖的package包/类
public static <T extends Entity> Predicate<T> getTeamCollisionPredicate(final Entity entityIn)
{
    final Team team = entityIn.getTeam();
    final Team.CollisionRule team$collisionrule = team == null ? Team.CollisionRule.ALWAYS : team.getCollisionRule();
    Predicate<?> ret = team$collisionrule == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : Predicates.and(NOT_SPECTATING, new Predicate<Entity>()
    {
        public boolean apply(@Nullable Entity p_apply_1_)
        {
            if (!p_apply_1_.canBePushed())
            {
                return false;
            }
            else if (!entityIn.world.isRemote || p_apply_1_ instanceof EntityPlayer && ((EntityPlayer)p_apply_1_).isUser())
            {
                Team team1 = p_apply_1_.getTeam();
                Team.CollisionRule team$collisionrule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule();

                if (team$collisionrule1 == Team.CollisionRule.NEVER)
                {
                    return false;
                }
                else
                {
                    boolean flag = team != null && team.isSameTeam(team1);
                    return (team$collisionrule == Team.CollisionRule.HIDE_FOR_OWN_TEAM || team$collisionrule1 == Team.CollisionRule.HIDE_FOR_OWN_TEAM) && flag ? false : team$collisionrule != Team.CollisionRule.HIDE_FOR_OTHER_TEAMS && team$collisionrule1 != Team.CollisionRule.HIDE_FOR_OTHER_TEAMS || flag;
                }
            }
            else
            {
                return false;
            }
        }
    });
    return (Predicate<T>)ret;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:36,代码来源:EntitySelectors.java

示例8: getAllPassibleAttributesForUpgradeStation

import com.google.common.base.Predicates; //导入方法依赖的package包/类
public static List<TF2Attribute> getAllPassibleAttributesForUpgradeStation() {
	List<TF2Attribute> list = new ArrayList<>();
	for (TF2Attribute attr : attributes)
		if (attr != null && attr.canApply != Predicates.<ItemStack>alwaysFalse() && attr.state == State.POSITIVE)
			for (int i = 0; i < attr.weight; i++)
				list.add(attr);
	return list;
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:9,代码来源:TF2Attribute.java

示例9: getTeamCollisionPredicate

import com.google.common.base.Predicates; //导入方法依赖的package包/类
public static <T extends Entity> Predicate<T> getTeamCollisionPredicate(final Entity entityIn)
{
    final Team team = entityIn.getTeam();
    final Team.CollisionRule team$collisionrule = team == null ? Team.CollisionRule.ALWAYS : team.getCollisionRule();
    Predicate<?> ret = team$collisionrule == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : Predicates.and(NOT_SPECTATING, new Predicate<Entity>()
    {
        public boolean apply(@Nullable Entity p_apply_1_)
        {
            if (!p_apply_1_.canBePushed())
            {
                return false;
            }
            else if (!entityIn.worldObj.isRemote || p_apply_1_ instanceof EntityPlayer && ((EntityPlayer)p_apply_1_).isUser())
            {
                Team team1 = p_apply_1_.getTeam();
                Team.CollisionRule team$collisionrule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule();

                if (team$collisionrule1 == Team.CollisionRule.NEVER)
                {
                    return false;
                }
                else
                {
                    boolean flag = team != null && team.isSameTeam(team1);
                    return (team$collisionrule == Team.CollisionRule.HIDE_FOR_OWN_TEAM || team$collisionrule1 == Team.CollisionRule.HIDE_FOR_OWN_TEAM) && flag ? false : team$collisionrule != Team.CollisionRule.HIDE_FOR_OTHER_TEAMS && team$collisionrule1 != Team.CollisionRule.HIDE_FOR_OTHER_TEAMS || flag;
                }
            }
            else
            {
                return false;
            }
        }
    });
    return (Predicate<T>)ret;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:36,代码来源:EntitySelectors.java

示例10: unassessedFilter

import com.google.common.base.Predicates; //导入方法依赖的package包/类
@Override
public Predicate<Response> unassessedFilter() {
  return Predicates.alwaysFalse();
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:5,代码来源:LocatePossibleAssessmentMistakes.java

示例11: unassessedFilter

import com.google.common.base.Predicates; //导入方法依赖的package包/类
@Override
public Predicate<Response> unassessedFilter() {
  // unassessed answers cannot be linked
  return Predicates.alwaysFalse();
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:6,代码来源:LinkableResponseFilter2015ForGold.java

示例12: Context

import com.google.common.base.Predicates; //导入方法依赖的package包/类
public Context(int expectedNumRelations) {
    this(expectedNumRelations, Predicates.<Symbol>alwaysFalse());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:4,代码来源:FieldCollectingVisitor.java

示例13: build

import com.google.common.base.Predicates; //导入方法依赖的package包/类
/**
 * Builds a classifier based on previous allow/match decisions.
 * This may be reused after a call to build and subsequent calls to
 * allow/match methods will not affect previously built classifiers.
 */
public QueryClassifier build() {
  ImmutableSet<String> mayKeySet = mayKeys.build();
  Predicate<? super String> mayKeyClassifier;
  if (mayClassifier != null) {
    mayKeyClassifier = mayClassifier;
  } else if (mayKeySet.isEmpty()) {
      // If nothing specified, assume permissive.
    mayKeyClassifier = Predicates.alwaysTrue();
  } else {
    // If a set specified, defer to the set.
    mayKeyClassifier = Predicates.<String>alwaysFalse();
  }

  ImmutableSet<String> onceKeySet = onceKeys.build();
  Predicate<? super String> onceKeyClassifier;
  if (onceClassifier != null) {
    onceKeyClassifier = onceClassifier;
  } else {
    onceKeyClassifier = Predicates.<String>alwaysFalse();
  }

  ImmutableSet<String> mustKeySet = mustKeys.build();
  ImmutableMap<String, Predicate<? super Optional<String>>> valueClassifierMap =
      ImmutableMap.copyOf(valueClassifiers);

  // If something may appear once or must appear, then it may appear.
  if (!Predicates.alwaysTrue().equals(mayKeyClassifier)) {
    if (!Predicates.alwaysFalse().equals(onceKeyClassifier)) {
      mayKeyClassifier = Predicates.or(mayKeyClassifier, onceKeyClassifier);
    }
    mayKeySet = ImmutableSet.<String>builder()
        .addAll(mayKeySet)
        .addAll(onceKeySet)
        .addAll(mustKeySet)
        .build();
  }

  return new QueryClassifierImpl(
      mayKeySet,
      mayKeyClassifier,
      onceKeySet,
      onceKeyClassifier,
      mustKeySet,
      valueClassifierMap);
}
 
开发者ID:OWASP,项目名称:url-classifier,代码行数:51,代码来源:QueryClassifierBuilder.java


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