List of usage examples for com.google.common.base Predicates alwaysTrue
@GwtCompatible(serializable = true) public static <T> Predicate<T> alwaysTrue()
From source file:com.isotrol.impe3.palette.menu.category.CategoryComponent.java
private Predicate<? super Category> calculateIncludeNotVisible() { boolean include = false; if (componentConfig != null && componentConfig.includeNotVisible() != null) { include = componentConfig.includeNotVisible().booleanValue(); } else if (config != null && config.includeNotVisible() != null) { include = config.includeNotVisible().booleanValue(); }/* w ww . j a v a 2 s. c om*/ if (include) { return Predicates.alwaysTrue(); } return Category.VISIBLE; }
From source file:io.crate.test.integration.CrateTestCluster.java
private synchronized NodeAndClient getRandomNodeAndClient() { Predicate<NodeAndClient> all = Predicates.alwaysTrue(); return getRandomNodeAndClient(all); }
From source file:net.automatalib.util.ts.copy.TSCopy.java
/** * Copies a {@link UniversalAutomaton} to a {@link MutableAutomaton} with possibly heterogeneous input alphabets and state and transition * properties. States and transitions will not be filtered * //from w w w. j a v a 2 s.c o m * @param method the traversal method to use * @param in the input transition system * @param limit the traversal limit, a value less than 0 means no limit * @param inputs the inputs to consider * @param out the output automaton * @param inputsMapping the transformation for input symbols * @param spTransform the transformation for state properties * @param tpTransform the transformation for transition properties * @return a mapping from old to new states */ public static <S1, I1, T1, SP1, TP1, S2, I2, T2, SP2, TP2> Mapping<S1, S2> copy(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP1, ? extends TP1> in, int limit, Collection<? extends I1> inputs, MutableAutomaton<S2, I2, T2, ? super SP2, ? super TP2> out, Function<? super I1, ? extends I2> inputsMapping, Function<? super SP1, ? extends SP2> spTransform, Function<? super TP1, ? extends TP2> tpTransform) { return copy(method, in, limit, inputs, out, inputsMapping, spTransform, tpTransform, Predicates.alwaysTrue(), TransitionPredicates.alwaysTrue()); }
From source file:com.eucalyptus.autoscaling.common.internal.instances.PersistenceAutoScalingInstances.java
@Override public Set<String> verifyInstanceIds(final String accountNumber, final Collection<String> instanceIds) throws AutoScalingMetadataException { final Set<String> verifiedInstanceIds = Sets.newHashSet(); if (!instanceIds.isEmpty()) { final AutoScalingInstance example = AutoScalingInstance.withOwner(accountNumber); final Criterion idCriterion = Property.forName("displayName").in(instanceIds); Iterables.addAll(verifiedInstanceIds, persistenceSupport.listByExample(example, Predicates.alwaysTrue(), idCriterion, Collections.<String, String>emptyMap(), AutoScalingInstances.instanceId())); }//from www. j a v a 2s . c om return verifiedInstanceIds; }
From source file:net.sourceforge.fenixedu.presentationTier.Action.candidacy.CandidacyProcessDA.java
protected Predicate<IndividualCandidacyProcess> getChildProcessSelectionPredicate( final CandidacyProcess process, HttpServletRequest request) { return Predicates.alwaysTrue(); }
From source file:forge.quest.QuestController.java
/** * New game.// w w w . j a v a 2s . co m * * @param name the name * @param difficulty * the difficulty * @param mode the mode * @param formatPrizes * prize boosters format * @param allowSetUnlocks * allow unlocking of sets * @param startingCards * the starting deck * @param formatStartingPool * format used for the starting pool * @param startingWorld * starting world * @param userPrefs * user preferences */ public void newGame(final String name, final int difficulty, final QuestMode mode, final GameFormat formatPrizes, final boolean allowSetUnlocks, final Deck startingCards, final GameFormat formatStartingPool, final String startingWorld, final StartingPoolPreferences userPrefs) { this.load(new QuestData(name, difficulty, mode, formatPrizes, allowSetUnlocks, startingWorld)); // pass awards and unlocks here if (startingCards != null) { this.myCards.addDeck(startingCards); } else { Predicate<PaperCard> filter = Predicates.alwaysTrue(); if (formatStartingPool != null) { filter = formatStartingPool.getFilterPrinted(); } this.myCards.setupNewGameCardPool(filter, difficulty, userPrefs); } this.getAssets() .setCredits(FModel.getQuestPreferences().getPrefInt(DifficultyPrefs.STARTING_CREDITS, difficulty)); }
From source file:org.apache.brooklyn.location.jclouds.JcloudsStubTemplateBuilder.java
protected Hardware getHardware() { switch (providerName) { case "aws-ec2": case "ec2": return t2_micro().id("supporting-bogus").supportsImageIds(ImmutableSet.of("us-east-1/bogus-image")) .virtualizationType(VirtualizationType.PARAVIRTUAL).rootDeviceType(RootDeviceType.EBS).build(); case "google-compute-engine": return new HardwareBuilder().providerId(providerName).id("n1-standard-1").ram(3750) .processor(new Processor(1, 1234)).supportsImage(Predicates.alwaysTrue()).build(); default:/*from www . j a va 2s .c o m*/ throw new UnsupportedOperationException("Unsupported stubbed Hardware for provider " + providerName); } }
From source file:com.isotrol.impe3.palette.menu.category.CategoryComponent.java
private Predicate<? super Category> calculateIncludeNotRoutable() { boolean include = false; if (componentConfig != null && componentConfig.includeNotRoutable() != null) { include = componentConfig.includeNotRoutable().booleanValue(); } else if (config != null && config.includeNotRoutable() != null) { include = config.includeNotRoutable().booleanValue(); }//from w ww . j ava 2 s . com if (include) { return Predicates.alwaysTrue(); } return Category.IS_ROUTABLE; }
From source file:edu.buaa.satla.analysis.core.arg.ARGUtils.java
/** * Writes the ARG with the root state pRootState to pSb as a graphviz dot file * *///from w w w .j av a 2s.c om public static void writeARGAsDot(Appendable pSb, ARGState pRootState) throws IOException { ARGToDotWriter.write(pSb, pRootState, ARGUtils.CHILDREN_OF_STATE, Predicates.alwaysTrue(), Predicates.alwaysFalse()); }
From source file:forge.game.card.CardFactoryUtil.java
public static boolean handleHiddenAgenda(Player player, Card card) { SpellAbility sa = new SpellAbility.EmptySa(card); sa.getMapParams().put("AILogic", card.getSVar("AgendaLogic")); Predicate<PaperCard> cpp = Predicates.alwaysTrue(); //Predicate<Card> pc = Predicates.in(player.getAllCards()); // TODO This would be better to send in the player's deck, not all cards String name = player.getController().chooseCardName(sa, cpp, "Card", "Name a card for " + card.getName()); if (name == null || name.isEmpty()) { return false; }/* ww w . java 2 s .co m*/ card.setNamedCard(name); card.turnFaceDown(); // Hopefully face down also hides the named card? card.addSpellAbility(abilityRevealHiddenAgenda(card)); return true; }