List of usage examples for com.google.common.base Predicates alwaysTrue
@GwtCompatible(serializable = true) public static <T> Predicate<T> alwaysTrue()
From source file:org.jclouds.trmk.vcloud_0_8.config.DefaultVCloudReferencesModule.java
@Provides @Singleton @org.jclouds.trmk.vcloud_0_8.endpoints.Org protected Predicate<ReferenceType> provideDefaultOrgSelector(Injector i) { return Predicates.alwaysTrue(); }
From source file:org.opensaml.profile.action.AbstractConditionalProfileAction.java
/** Constructor. */ public AbstractConditionalProfileAction() { activationCondition = Predicates.alwaysTrue(); }
From source file:net.shibboleth.idp.profile.spring.relyingparty.impl.DefaultRelyingPartyParser.java
/** {@inheritDoc} */ @Override/* w w w. jav a 2s . c om*/ protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); builder.addPropertyValue("id", "DefaultRelyingParty"); builder.addPropertyValue("activationCondition", Predicates.alwaysTrue()); }
From source file:com.eucalyptus.compute.vpc.persist.PersistenceVpcs.java
@Override public <T> T lookupDefault(final OwnerFullName ownerFullName, final Function<? super Vpc, T> transform) throws VpcMetadataException { try {//from w ww. j av a2 s . co m return Iterables.getOnlyElement( listByExample(Vpc.exampleDefault(ownerFullName), Predicates.alwaysTrue(), transform)); } catch (NoSuchElementException e) { throw new VpcMetadataNotFoundException(qualifyOwner("Default VPC not found", ownerFullName)); } }
From source file:com.google.cloud.bigtable.grpc.UnaryCallRetryInterceptor.java
public UnaryCallRetryInterceptor(Channel delegate, ScheduledExecutorService executorService, Set<MethodDescriptor<?, ?>> retriableMethods, int initialBackoffMillis, double backoffMultiplier, int maxElapsedBackoffMillis) { this(delegate, executorService, Maps.asMap(retriableMethods, new Function<MethodDescriptor<?, ?>, Predicate<?>>() { @Override/*from w w w . j a v a 2 s.c o m*/ public Predicate<Object> apply(MethodDescriptor<?, ?> methodDescriptor) { return Predicates.alwaysTrue(); } }), initialBackoffMillis, backoffMultiplier, maxElapsedBackoffMillis); }
From source file:org.jclouds.vcloud.config.DefaultVCloudReferencesModule.java
@Provides @Singleton @org.jclouds.vcloud.endpoints.Org protected Predicate<ReferenceType> provideDefaultOrgSelector(Injector i) { return Predicates.alwaysTrue(); }
From source file:com.eucalyptus.simpleworkflow.persist.PersistenceDomains.java
public <T> List<T> listDeprecatedExpired(final long time, final Function<? super Domain, T> transform) throws SwfMetadataException { return listByExample(Domain.exampleWithStatus(Domain.Status.Deprecated), Predicates.alwaysTrue(), Restrictions.conjunction().add(Restrictions.isEmpty("workflowTypes")) .add(Restrictions.lt("lastUpdateTimestamp", new Date(time - getDeprecatedDomainRetentionDurationMillis()))), Collections.<String, String>emptyMap(), transform); }
From source file:net.derquinse.common.meta.MetaProperty.java
/** * Default constructor.// w w w. j a v a 2 s . c om * @param name Property name. * @param required True if the property is required. * @param validity Validity predicate. * @param defaultValue Default value for the property. */ protected MetaProperty(String name, boolean required, @Nullable Predicate<? super T> validity, @Nullable T defaultValue) { super(name); this.required = required; if (validity != null) { this.validity = validity; } else { this.validity = Predicates.alwaysTrue(); } this.defaultValue = defaultValue; }
From source file:com.isotrol.impe3.connectors.device.AbstractDeviceResolver.java
AbstractDeviceResolver(DeviceResolverModuleConfig config) { final boolean html; final boolean xhtml; final boolean others; if (config == null) { uses = false;/* ww w . j a va2s . c o m*/ html = true; xhtml = true; others = false; } else { uses = config.includeDeviceNameUses(); html = config.includeHTML(); xhtml = config.includeXHTML(); others = config.includeOthers(); } if (html && xhtml && others) { this.filter = Predicates.alwaysTrue(); } else { this.filter = new Predicate<DeviceInPortal>() { public boolean apply(DeviceInPortal input) { final DeviceType type = input.getDevice().getType(); final boolean isHtml = type == DeviceType.HTML; final boolean isXHtml = type == DeviceType.XHTML; return (html && isHtml) || (xhtml && isXHtml) || (others && !isHtml && !isXHtml); } }; } }
From source file:com.eucalyptus.compute.vpc.persist.PersistenceSubnets.java
@Override public <T> T lookupDefault(final OwnerFullName ownerFullName, final String availabilityZone, final Function<? super Subnet, T> transform) throws VpcMetadataException { try {/*w ww . j av a2 s .c o m*/ return Iterables.getOnlyElement(listByExample(Subnet.exampleDefault(ownerFullName, availabilityZone), Predicates.alwaysTrue(), transform)); } catch (NoSuchElementException e) { throw new VpcMetadataNotFoundException( qualifyOwner("Default subnet not found for zone: " + availabilityZone, ownerFullName)); } }