Uses of Class
org.opencastproject.util.data.Function0
Packages that use Function0
Package
Description
Utility classes for dealing with media packages, collections, URLs, files, and streams.
-
Uses of Function0 in org.opencastproject.util
Methods in org.opencastproject.util that return Function0Modifier and TypeMethodDescriptionstatic Function0<InputStream> IoSupport.fileInputStream(File a) Create a function that creates aFileInputStream.Methods in org.opencastproject.util with parameters of type Function0Modifier and TypeMethodDescription<A> Option<A> Apply functionfonly if no other thread currently applies a function using this needle eye.IoSupport.withResource(Function0<B> r, Function<Exception, Err> toErr, Function<B, A> f) Handle a closeable resource insidefand ensure thatrgets closed properly.static <A,Err> Either <Err, A> IoSupport.withStream(Function0<InputStream> s, Function<Exception, Err> toErr, Function<InputStream, A> f) Deprecated. -
Uses of Function0 in org.opencastproject.util.data
Subclasses of Function0 in org.opencastproject.util.dataModifier and TypeClassDescriptionclassRun a side effect.static classVersion ofEffect0that allows for throwing a checked exception.static classFunction0.X<A>Version ofFunction0that allows for throwing a checked exception.Methods in org.opencastproject.util.data that return Function0Modifier and TypeMethodDescriptionCurrying.static <A> Function0<A> Deprecated.useOption.orError(Throwable)orOption.orElse(Function0)instead since it saves the need for creating new objects just for the sake of type soundness.Function composition.<B> Function0<B> Apply this function, then pass the result tof.<B> Function0<B> Apply this function and ignore its result, then applyf.Methods in org.opencastproject.util.data that return types with arguments of type Function0Methods in org.opencastproject.util.data with parameters of type Function0Modifier and TypeMethodDescriptionabstract AGet the contained value in case of being "some" or return the result of evaluatingnoneotherwise.Function composition.Lazy version ofOption.orElse(Option).<B> Function0<B> Apply this function and ignore its result, then applyf. -
Uses of Function0 in org.opencastproject.util.data.functions
Methods in org.opencastproject.util.data.functions that return Function0Modifier and TypeMethodDescriptionstatic <A,B> Function0 <B> Curry a function of arity 1.static <A,B> Function0 <B> Function composition:f . g = f(g) = o(f, g)static <A,B> Function0 <B> Left to right composition:f then g = g(f)static <A,B> Function0 <B> Applyfand ignore its result, then applyg.Methods in org.opencastproject.util.data.functions that return types with arguments of type Function0Modifier and TypeMethodDescriptionCurry a function of arity 1.Methods in org.opencastproject.util.data.functions with parameters of type Function0
IoSupport.withResource(org.opencastproject.util.data.Function0, org.opencastproject.util.data.Function, org.opencastproject.util.data.Function)instead