List of usage examples for com.google.common.base Predicates alwaysFalse
@GwtCompatible(serializable = true) public static <T> Predicate<T> alwaysFalse()
From source file:cherry.foundation.querydsl.QueryDslSupportImpl.java
@Transactional @Override/* w w w . jav a 2s.co m*/ public <T> PagedList<T> search(QueryConfigurer commonClause, QueryConfigurer orderByClause, long pageNo, long pageSz, final Expression<T> expression) { Predicate<Long> cancelPredicate = Predicates.alwaysFalse(); return search(commonClause, orderByClause, pageNo, pageSz, cancelPredicate, expression); }
From source file:com.google.devtools.build.lib.runtime.WorkspaceBuilder.java
BlazeWorkspace build(BlazeRuntime runtime, PackageFactory packageFactory, ConfiguredRuleClassProvider ruleClassProvider, String productName, SubscriberExceptionHandler eventBusExceptionHandler) throws AbruptExitException { // Set default values if none are set. if (skyframeExecutorFactory == null) { skyframeExecutorFactory = new SequencedSkyframeExecutorFactory(); }//from ww w . jav a 2 s . co m if (allowedMissingInputs == null) { allowedMissingInputs = Predicates.alwaysFalse(); } if (preprocessorFactorySupplier == null) { preprocessorFactorySupplier = Preprocessor.Factory.Supplier.NullSupplier.INSTANCE; } SkyframeExecutor skyframeExecutor = skyframeExecutorFactory.create(packageFactory, directories, binTools, workspaceStatusActionFactory, ruleClassProvider.getBuildInfoFactories(), diffAwarenessFactories.build(), allowedMissingInputs, preprocessorFactorySupplier, skyFunctions.build(), precomputedValues.build(), customDirtinessCheckers.build(), productName); return new BlazeWorkspace(runtime, directories, skyframeExecutor, eventBusExceptionHandler, workspaceStatusActionFactory, binTools); }
From source file:gg.uhc.uhc.modules.team.TeamModule.java
@Override public void initialize() throws InvalidConfigurationException { if (!config.contains("removed team combos")) { config.set("removed team combos", Lists.newArrayList("RESET", "STRIKETHROUGH", "MAGIC", "BLACK", "WHITE", "=GRAY+ITALIC" // spectator styling in tab ));//from ww w .ja v a 2 s . c o m } Predicate<Prefix> isFiltered; try { List<String> removedCombos = config.getStringList("removed team combos"); List<Predicate<Prefix>> temp = Lists.newArrayListWithCapacity(removedCombos.size()); PrefixColourPredicateConverter converter = new PrefixColourPredicateConverter(); for (String combo : removedCombos) { temp.add(converter.convert(combo)); } isFiltered = Predicates.or(temp); } catch (Exception ex) { ex.printStackTrace(); plugin.getLogger() .severe("Failed to parse filtered team combos, allowing all combos to be used instead"); isFiltered = Predicates.alwaysFalse(); } setupTeams(Predicates.not(isFiltered)); this.icon.setLore(messages.evalTemplates("lore", ImmutableMap.of("count", teams.size()))); }
From source file:fi.vm.kapa.identification.shibboleth.flow.SLOCheckKatso.java
@Override protected void doInitialize() throws ComponentInitializationException { super.doInitialize(); if (!getActivationCondition().equals(Predicates.alwaysFalse())) { if (sessionResolver == null) { throw new ComponentInitializationException("SessionResolver cannot be null"); }// www . j ava 2s . c o m } }
From source file:org.opensaml.saml.saml2.profile.impl.AbstractEncryptAction.java
/** Constructor. */ public AbstractEncryptAction() { encryptionCtxLookupStrategy = Functions.compose(new ChildContextLookup<>(EncryptionContext.class), new OutboundMessageContextLookup()); keyPlacementLookupStrategy = FunctionSupport .<ProfileRequestContext, KeyPlacement>constant(KeyPlacement.INLINE); encryptToSelf = Predicates.alwaysFalse(); }
From source file:org.opensaml.saml.saml1.profile.impl.AddStatusToResponse.java
/** Constructor. */ public AddStatusToResponse() { responseLookupStrategy = Functions.compose(new MessageLookup<>(Response.class), new OutboundMessageContextLookup()); detailedErrorsCondition = Predicates.alwaysFalse(); defaultStatusCodes = Collections.emptyList(); detailedErrors = false;/*w w w.ja v a 2 s.c o m*/ }
From source file:org.opensaml.saml.saml2.profile.impl.AddStatusToResponse.java
/** Constructor. */ public AddStatusToResponse() { responseLookupStrategy = Functions.compose(new MessageLookup<>(StatusResponseType.class), new OutboundMessageContextLookup()); detailedErrorsCondition = Predicates.alwaysFalse(); defaultStatusCodes = Collections.emptyList(); detailedErrors = false;/*w ww. j a v a 2 s . c o m*/ }
From source file:org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.AbstractCopyPasteLayoutAction.java
/** * Indicates if the given ddiagram is allowing copy/paste layout. * /* www .ja v a 2s .c om*/ * @param diagram * the diagram to inspect * @return true if the given ddiagram is allowing copy/paste layout actions, * false otherwise */ public static Predicate<DSemanticDecorator> allowsCopyPasteLayout(DDiagram diagram) { // default return value is true (for basic DDiagram that are not handled // by any DiagramDescriptionProvider). Predicate<DSemanticDecorator> result = Predicates.alwaysTrue(); // If an aird has been opened from the Package Explorer View, then // we return false as no diagram is associated to this editor if (diagram == null || diagram.getDescription() == null) { return Predicates.alwaysFalse(); } // If diagram is not null, we search for a possible // DiagramDescriptionProvider handling this type of diagram for (final IDiagramTypeDescriptor diagramTypeDescriptor : DiagramTypeDescriptorRegistry.getInstance() .getAllDiagramTypeDescriptors()) { if (diagramTypeDescriptor.getDiagramDescriptionProvider() .handles(diagram.getDescription().eClass().getEPackage())) { // This DiagramDescriptionProvider may forbid copy/paste layout. final IDiagramDescriptionProvider provider = diagramTypeDescriptor.getDiagramDescriptionProvider(); result = new Predicate<DSemanticDecorator>() { @Override public boolean apply(DSemanticDecorator input) { return provider.allowsCopyPasteLayout(input); } }; break; } } return result; }
From source file:org.eclipse.sirius.diagram.ui.tools.internal.actions.layout.AbstractCopyPasteFormatAction.java
/** * Indicates if the given ddiagram is allowing copy/paste format. * /*www . j a va2s . c om*/ * @param diagram * the diagram to inspect * @return true if the given ddiagram is allowing copy/paste format actions, * false otherwise */ public static Predicate<DSemanticDecorator> allowsCopyPasteFormat(DDiagram diagram) { // default return value is true (for basic DDiagram that are not handled // by any DiagramDescriptionProvider). Predicate<DSemanticDecorator> result = Predicates.alwaysTrue(); // If an aird has been opened from the Package Explorer View, then // we return false as no diagram is associated to this editor if (diagram == null || diagram.getDescription() == null) { return Predicates.alwaysFalse(); } // If diagram is not null, we search for a possible // DiagramDescriptionProvider handling this type of diagram for (final IDiagramTypeDescriptor diagramTypeDescriptor : DiagramTypeDescriptorRegistry.getInstance() .getAllDiagramTypeDescriptors()) { if (diagramTypeDescriptor.getDiagramDescriptionProvider() .handles(diagram.getDescription().eClass().getEPackage())) { // This DiagramDescriptionProvider may forbid copy/paste format. final IDiagramDescriptionProvider provider = diagramTypeDescriptor.getDiagramDescriptionProvider(); result = new Predicate<DSemanticDecorator>() { @Override public boolean apply(DSemanticDecorator input) { return provider.allowsCopyPasteFormat(input); } }; break; } } return result; }
From source file:net.shibboleth.idp.session.impl.PopulateSessionContext.java
/** {@inheritDoc} */ @Override//from ww w. j a va2 s.c o m protected void doInitialize() throws ComponentInitializationException { super.doInitialize(); if (!getActivationCondition().equals(Predicates.alwaysFalse()) && sessionResolver == null) { throw new ComponentInitializationException("SessionResolver cannot be null"); } }