@SuppressWarnings("unchecked") @Deprecated /** @deprecated since 0.7.0 use Function */ public NamedActionWithUrl(String actionName, Closure<String> postProcessing) { this.actionName = actionName; this.postProcessing = (Function<T, String>) ((postProcessing == null) ? null : GroovyJavaMethods.functionFromClosure(postProcessing)); }
/** * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted; also use {@link EnricherSpec} */ @Deprecated public TimeWeightedDeltaEnricher(Entity producer, Sensor<T> source, Sensor<Double> target, int unitMillis, Closure<Double> postProcessor) { this(producer, source, target, unitMillis, GroovyJavaMethods.<Double,Double>functionFromClosure(postProcessor)); }
/** * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public <V2> Builder<T,V2> postProcess(Closure<V2> val) { this.postProcess = (Function) GroovyJavaMethods.<T,V2>functionFromClosure(checkNotNull(val, "postProcess")); return (Builder<T,V2>) this; } @SuppressWarnings({ "unchecked", "rawtypes" })
/** * @see #transformMultiple(Function, TaskAdaptable...) * * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public static <U,T> Task<T> transformMultiple(Map flags, Closure transformer, TaskAdaptable<U> ...tasks) { return transformMultiple(flags, GroovyJavaMethods.functionFromClosure(transformer), tasks); }
/** * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated public static <T,V> Task<V> attributePostProcessedWhenReady(final Entity source, final AttributeSensor<T> sensor, final Predicate<? super T> ready, final Closure<V> postProcess) { return attributePostProcessedWhenReady(source, sensor, ready, GroovyJavaMethods.<T,V>functionFromClosure(postProcess)); }
/** * @see #transform(Task, Function) * * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public static <U,T> Task<T> transform(Task<U> task, Closure transformer) { return transform(task, GroovyJavaMethods.functionFromClosure(transformer)); }
/** * @see #transformMultiple(Function, TaskAdaptable...) * * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public static <U,T> Task<T> transformMultiple(Closure transformer, TaskAdaptable<U> ...tasks) { return transformMultiple(GroovyJavaMethods.functionFromClosure(transformer), tasks); }
/** * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated public static <T,V> Task<V> attributePostProcessedWhenReady(Entity source, AttributeSensor<T> sensor, Closure<V> postProcess) { return attributePostProcessedWhenReady(source, sensor, JavaGroovyEquivalents.groovyTruthPredicate(), GroovyJavaMethods.<T,V>functionFromClosure(postProcess)); }
/** * @deprecated since 0.11.0; explicit groovy utilities/support will be deleted. */ @Deprecated public static <T,V> Task<V> attributePostProcessedWhenReady(Entity source, AttributeSensor<T> sensor, Closure<Boolean> ready, Closure<V> postProcess) { Predicate<? super T> readyPredicate = (ready != null) ? GroovyJavaMethods.predicateFromClosure(ready) : JavaGroovyEquivalents.groovyTruthPredicate(); Function<? super T, V> postProcessFunction = GroovyJavaMethods.<T,V>functionFromClosure(postProcess); return attributePostProcessedWhenReady(source, sensor, readyPredicate, postProcessFunction); }