Uses of Class
org.opencastproject.util.data.Function
Packages that use Function
Package
Description
Service implementation classes
Utility classes for dealing with media packages, collections, URLs, files, and streams.
-
Uses of Function in org.opencastproject.job.api
Fields in org.opencastproject.job.api declared as FunctionModifier and TypeFieldDescriptionstatic final Function<Incident, JaxbIncident> JaxbIncident.mkFnstatic final Function<Map.Entry<String, String>, JaxbIncident.Param> JaxbIncident.Param.mkFnstatic final Function<Tuple<String, String>, JaxbIncidentDetail> JaxbIncidentDetail.mkFnstatic final Function<IncidentTree, JaxbIncidentTree> JaxbIncidentTree.mkFnstatic final Function<JaxbIncidentDetail, Tuple<String, String>> JaxbIncidentDetail.toDetailFnstatic final Function<JaxbIncident, Incident> JaxbIncident.toIncidentFnstatic final Function<JaxbIncidentTree, IncidentTree> JaxbIncidentTree.toIncidentTreeFnMethods in org.opencastproject.job.api that return FunctionModifier and TypeMethodDescriptionstatic Function<Incident, JaxbIncidentDigest> JaxbIncidentDigest.mkFn(IncidentService svc, Locale locale) JaxbIncidentDigestTree.mkFn(IncidentService svc, Locale locale) static Function<Incident, JaxbIncidentFull> JaxbIncidentFull.mkFn(IncidentService svc, Locale locale) static Function<IncidentTree, JaxbIncidentFullTree> JaxbIncidentFullTree.mkFn(IncidentService svc, Locale locale) -
Uses of Function in org.opencastproject.mediapackage
Fields in org.opencastproject.mediapackage declared as FunctionModifier and TypeFieldDescriptionstatic final Function<MediaPackageElement, List<Attachment>> MediaPackageSupport.Filters.attachmentsstatic final Function<MediaPackageElement, List<Catalog>> MediaPackageSupport.Filters.catalogsstatic final Function<MediaPackage, String> MediaPackageSupport.getIdDeprecated.static final Function<MediaPackageElement, String> MediaPackageSupport.getMediaPackageElementIdMediaPackageSupport.Filters.hasAudiostatic final Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.hasChecksumMediaPackageSupport.Filters.hasNoAudiostatic final Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.hasNoChecksumMediaPackageSupport.Filters.hasNoVideoMediaPackageSupport.Filters.hasVideostatic final Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.isEpisodeDublinCorestatic final Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.isNotPublicationstatic final Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.isPublicationstatic final Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.isSmilCatalogstatic final Function<MediaPackageElementFlavor, Function<MediaPackageElement, Boolean>> MediaPackageSupport.Filters.matchesFlavorstatic final Function<String, MediaPackageElementFlavor> MediaPackageElementFlavor.parseFlavorstatic final Function<MediaPackageElement, List<Publication>> MediaPackageSupport.Filters.presentationsstatic final Function<MediaPackageElement, List<Track>> MediaPackageSupport.Filters.tracksFields in org.opencastproject.mediapackage with type parameters of type FunctionModifier and TypeFieldDescriptionstatic final Function<MediaPackageElementFlavor, Function<MediaPackageElement, Boolean>> MediaPackageSupport.Filters.matchesFlavorMethods in org.opencastproject.mediapackage that return FunctionModifier and TypeMethodDescriptionMediaPackageSupport.Filters.byFlavor(MediaPackageElementFlavor flavor) static <A extends MediaPackageElement>
Function<MediaPackageElement, List<A>> static <A extends MediaPackageElement>
Function<A, String> MediaPackageElementParser.getAsXml()static Function<MediaPackageElement, Boolean> Check if mediapackage element has any of the given tags.static Function<MediaPackageElement, Boolean> MediaPackageSupport.Filters.matchesFlavor(MediaPackageElementFlavor flavor) Return true if the element has a flavor that matchesflavor.static Function<Publication, Boolean> Filters publications to channelchannelId.static <A extends MediaPackageElement>
Function<MediaPackageElement, Boolean> -
Uses of Function in org.opencastproject.serviceregistry.api
Fields in org.opencastproject.serviceregistry.api declared as FunctionModifier and TypeFieldDescriptionstatic final Function<org.apache.http.HttpResponse, Option<List<MediaPackageElement>>> RemoteBase.elementsFromHttpResponseMethods in org.opencastproject.serviceregistry.api with parameters of type FunctionModifier and TypeMethodDescriptionprotected <A> Option<A> RemoteBase.runRequest(org.apache.http.client.methods.HttpRequestBase req, Function<org.apache.http.HttpResponse, A> f) -
Uses of Function in org.opencastproject.util
Fields in org.opencastproject.util declared as FunctionModifier and TypeFieldDescriptionJsonVal.asBooleanJsonVal.asDoubleJsonVal.asFloatJsonVal.asIntegerJsonVal.asJsonArrJsonVal.asJsonObjJsonVal.asJsonValJsonVal.asLongJsonVal.asStringMimeType.eqMimeType.eq(org.opencastproject.util.MimeType)as a function.HttpUtil.getStatusCodestatic final Function<Jsons.Prop, Jsons.Val> Jsons.getValGet the value from a property.JobUtil.jobFromHttpResponseJsonObj.jsonObjJsonObj.jsonObj(java.util.Map)as a function.Jsons.notZeroCheck if a value is notJsons.ZERO_VAL.static final Function<InputStream, String> IoSupport.readToStringFunction that reads an input stream into a string using utf-8 encoding.Jsons.stringValMimeTypeUtil.suffixMimeType.getSuffix()as a function.MimeTypeUtil.toStringMimeType.toString()as a function.Methods in org.opencastproject.util that return FunctionModifier and TypeMethodDescriptionEnumSupport.parseEnum(A e) Create a function to parse a string into an Enum value.static Function<Job, MediaPackageElement> JobUtil.payloadAsMediaPackageElement(Job waiter, ServiceRegistry reg) Interpret the payload of a completedJobas aMediaPackageElement.static Function<Job, MediaPackageElement> JobUtil.payloadAsMediaPackageElement(ServiceRegistry reg) Interpret the payload of a completedJobas aMediaPackageElement.JobUtil.waitForJobSuccess(Job waiter, ServiceRegistry reg, Option<Long> timeout) Wait for the job to complete and return the success value.Methods in org.opencastproject.util with parameters of type FunctionModifier and TypeMethodDescription<A> Astatic <A> ARun functionfhaving exclusive read/write access to the given file.static <A,B extends Closeable>
AIoSupport.withResource(B b, Function<B, A> f) Handle a closeable resource insidefand ensure it gets closed properly.IoSupport.withResource(Function0<B> r, Function<Exception, Err> toErr, Function<B, A> f) Handle a closeable resource insidefand ensure thatrgets closed properly.static <A> AIoSupport.withStream(OutputStream s, Function<OutputStream, A> f) Deprecated.static <A,Err> Either <Err, A> IoSupport.withStream(Function0<InputStream> s, Function<Exception, Err> toErr, Function<InputStream, A> f) -
Uses of Function in org.opencastproject.util.data
Subclasses of Function in org.opencastproject.util.dataModifier and TypeClassDescriptionclassEffect<A>Run a side effect.static classEffect.X<A>Version ofEffectthat allows for throwing a checked exception.static classFunction.X<A,B> Version ofFunctionthat allows for throwing a checked exception.classPredicate<A>A predicate function.Methods in org.opencastproject.util.data that return FunctionModifier and TypeMethodDescriptionFunction.curry()Currying.Function2.curry()Currying.Currying.Create an equals function.Function composition.static <A> Function<A, A[]> Turn a value into a single element array.Left to right composition:f then g = g(f(x))Methods in org.opencastproject.util.data that return types with arguments of type FunctionMethods in org.opencastproject.util.data with parameters of type FunctionModifier and TypeMethodDescriptionabstract <B> Monadics.IteratorMonadic<B> Monadic bind.abstract <B> Monadics.ListMonadic<B> Monadic bindm a -> (a -> m b) -> m b.abstract <B> Option<B> Monadic bind operationm a -> (a -> m b) -> m b.abstract Monadics.IteratorMonadic<A> Apply side effecteto each element.abstract Monadics.ListMonadic<A> Apply side effecteto each element.abstract booleanCheck if at least one element satisfies predicatep.abstract booleanCheck if at least one element satisfies predicatep.static <B,A> Cell <A> abstract Monadics.IteratorMonadic<A> Retain all elements satisfying predicatep.abstract Monadics.ListMonadic<A> Retain all elements satisfying predicatep.Return the first element satisfying predicatep.final <B> Monadics.IteratorMonadic<B> Alias forMonadics.IteratorMonadic.bind(Function).final <B> Monadics.ListMonadic<B> Alias forMonadics.ListMonadic.bind(Function).<B> Option<B> abstract <B> Monadics.IteratorMonadic<B> Applyfto each element.abstract <B> Monadics.ListMonadic<B> Applyfto each elements building a new list.abstract <B> Option<B> abstract <X> X<B> Cell<B> static <A,B, M extends Collection<B>>
MCollections.map(Collection<A> as, M bs, Function<A, B> f) Deprecated.useMonadicsstatic <A,B> Collection <B> Collections.map(Collection<A> as, Function<A, B> f) Deprecated.useMonadicsfinal <B> Monadics.IteratorMonadic<B> Alias forMonadics.IteratorMonadic.fmap(Function).final <B> Monadics.ListMonadic<B> Alias forfmap.<B> Option<B> Function composition.Left to right composition:f then g = g(f(x))<B> Function0<B> Apply this function, then pass the result tof. -
Uses of Function in org.opencastproject.util.data.functions
Fields in org.opencastproject.util.data.functions declared as FunctionModifier and TypeFieldDescriptionBooleans.notStrings.toBoolConvert a string into a boolean.Strings.toDoubleConvert a string into a long if possible.Strings.toIntConvert a string into an integer if possible.Strings.trimToNilStrings.trimToNoneTrim a string and return eithersomeornoneif it's empty.Methods in org.opencastproject.util.data.functions that return FunctionModifier and TypeMethodDescriptionOptions.asList()Strings.asString()Returna.toString()wrapped in a some ifa !Strings.asStringNull()Returna.toString()or<null>if argument is null.static <A,B> Function <A, B> Misc.cast()Cast from A to B.Misc.chuck()Misc.chuck(Throwable)as a function.static <A,B> Function <A, B> Pure functions are covariant in their result type.static <A,B> Function <A, B> Pure functions are contravariant in their argument type.Curry a function of arity 1.Curry a function of arity 2.static <A,B, C> Function <B, C> Curry a function of arity 2.Functions.either(Function<? super A, ? extends B> f, Function<? super Exception, ? extends C> handler) Create a new function fromfdecorated with an exception handler.Booleans.eq(A a) Apply effecteto the result offwhich is then returned.static <A extends Comparable<A>>
Function<A, Boolean> Booleans.gt(A a) static <A,B> Function <A, B> Functions.handle(Function<? super A, ? extends B> f, Function<? super Exception, ? extends B> handler) Create a new function fromfdecorated with an exception handler.static <A> Function<A, A> Functions.identity()Identity function.static <A> Function<A, A> Functions.identity(A example) Identity function.static <A> Function<A, A> Identity function.static <A> Function<A, A> Misc.ifThen(A predicate, A b) static <A extends Comparable<A>>
Function<A, Boolean> Booleans.lt(A a) static <A,B, C> Function <A, C> Function composition:f . g = f(g(x)) = o(f, g)static <A,B> Function <A, B> Functions.rethrow(Function<? super A, ? extends B> f, Function<? super Exception, ? extends Exception> transformer) Create a new function fromfdecorated with an exception transformer.Create a split function from a regex pattern.static <A,B, C> Function <A, C> Left to right composition:f then g = g(f(x))static <A,B> Function <A, B> Pure functions are covariant in their result type and contravariant in their argument type.Booleans.yes()A function that always returns true.Methods in org.opencastproject.util.data.functions that return types with arguments of type FunctionModifier and TypeMethodDescriptionCurry a function of arity 2.Methods in org.opencastproject.util.data.functions with parameters of type FunctionModifier and TypeMethodDescriptionstatic <A,B> Function <A, B> Pure functions are covariant in their result type.static <A,B> Function <A, B> Pure functions are contravariant in their argument type.static <A,B> Function0 <B> Curry a function of arity 1.Curry a function of arity 1.Functions.either(Function<? super A, ? extends B> f, Function<? super Exception, ? extends C> handler) Create a new function fromfdecorated with an exception handler.Apply effecteto the result offwhich is then returned.static <A,B> Function <A, B> Functions.handle(Function<? super A, ? extends B> f, Function<? super Exception, ? extends B> handler) Create a new function fromfdecorated with an exception handler.static <A,B> Function0 <B> Function composition:f . g = f(g) = o(f, g)static <A,B, C> Function <A, C> Function composition:f . g = f(g(x)) = o(f, g)static <A,B> Function <A, B> Functions.rethrow(Function<? super A, ? extends B> f, Function<? super Exception, ? extends Exception> transformer) Create a new function fromfdecorated with an exception transformer.static <A,B, C> Function <A, C> Left to right composition:f then g = g(f(x))static <A,B> Function0 <B> Left to right composition:f then g = g(f)static <A,B> Effect <A> Turn a function into an effect by discarding its result.static <A,B> com.google.common.base.Function <A, B> Convert functionfinto a guava function.static <A> Predicate<A> Functions.toPredicate(Function<? super A, Boolean> f) static <A,B, C> Function2 <A, B, C> Uncurry to a function of arity 2. a -gt; b -gt; c =gt; (a, b) -gt; cstatic <A,B> Function <A, B> Pure functions are covariant in their result type and contravariant in their argument type.Method parameters in org.opencastproject.util.data.functions with type arguments of type Function
IoSupport.withResource(java.io.Closeable, org.opencastproject.util.data.Function)instead