Index

A C D E F G H I L M N O P R S T V W 
All Classes and Interfaces|All Packages|Serialized Form

A

AllExamples - Class in com.guinetik.corefun.examples
Runs all CoreFun examples.
AllExamples() - Constructor for class com.guinetik.corefun.examples.AllExamples
 

C

call() - Method in interface com.guinetik.corefun.SafeCallable
Computes the result, potentially throwing a checked exception.
com.guinetik.corefun - package com.guinetik.corefun
 
com.guinetik.corefun.examples - package com.guinetik.corefun.examples
 
combine(Computable<U>, BiFunction<T, U, R>) - Method in interface com.guinetik.corefun.Computable
Combines this value with another Computable's value.
Computable<T> - Interface in com.guinetik.corefun
A value wrapper that provides functional composition operations.
ComputableExample - Class in com.guinetik.corefun.examples
Demonstrates usage of Computable for functional value transformations.
ComputableExample() - Constructor for class com.guinetik.corefun.examples.ComputableExample
 

D

debug(String) - Method in interface com.guinetik.corefun.Loggable.Logger
Logs a debug message.
DefaultComputable<T> - Class in com.guinetik.corefun
Default immutable implementation of Computable.
DefaultComputable(T) - Constructor for class com.guinetik.corefun.DefaultComputable
Creates a new DefaultComputable with the given value.

E

equals(Object) - Method in class com.guinetik.corefun.DefaultComputable
 
error(String) - Method in interface com.guinetik.corefun.Loggable.Logger
Logs an error message.
error(String, Throwable) - Method in interface com.guinetik.corefun.Loggable.Logger
Logs an error message with an exception.
execute() - Method in interface com.guinetik.corefun.SafeRunnable
Executes this SafeRunnable, wrapping any exception.

F

failure(F) - Static method in class com.guinetik.corefun.Result
Creates a failed Result containing the given error.
filter(Predicate<T>, Supplier<T>) - Method in interface com.guinetik.corefun.Computable
Filters the value, returning a default if the predicate fails.
flatMap(Function<? super S, Result<T, F>>) - Method in class com.guinetik.corefun.Result
Transforms the success value with a function that returns a Result.
flatMap(Function<? super T, Computable<R>>) - Method in interface com.guinetik.corefun.Computable
Applies a transformation that returns a Computable and flattens the result.
fold(Function<? super F, ? extends R>, Function<? super S, ? extends R>) - Method in class com.guinetik.corefun.Result
Applies one of two functions depending on the Result state.
from(Runnable) - Static method in interface com.guinetik.corefun.SafeRunnable
Creates a SafeRunnable from a standard Runnable.
from(Callable<T>) - Static method in interface com.guinetik.corefun.SafeCallable
Creates a SafeCallable from a standard Callable.

G

get() - Method in class com.guinetik.corefun.Result
Gets the success value.
getError() - Method in class com.guinetik.corefun.Result
Gets the failure value.
getOrDefault(Callable<T>, T) - Static method in class com.guinetik.corefun.Try
Executes an operation, returning a default value on failure.
getOrElse(S) - Method in class com.guinetik.corefun.Result
Returns the success value or a default if this is a failure.
getOrElse(T) - Method in interface com.guinetik.corefun.SafeCallable
Executes and returns the result, or a default value on failure.
getOrElseGet(Supplier<? extends S>) - Method in class com.guinetik.corefun.Result
Returns the success value or computes a default if this is a failure.
getOrNull(Callable<T>) - Static method in class com.guinetik.corefun.Try
Executes an operation, returning null on failure.
getOrThrow() - Method in interface com.guinetik.corefun.SafeCallable
Executes and returns the result, wrapping any exception in SafeException.
getValue() - Method in interface com.guinetik.corefun.Computable
Retrieves the value managed by this computable.
getValue() - Method in class com.guinetik.corefun.DefaultComputable
 

H

hashCode() - Method in class com.guinetik.corefun.DefaultComputable
 

I

info(String) - Method in interface com.guinetik.corefun.Loggable.Logger
Logs an informational message.
isFailure() - Method in class com.guinetik.corefun.Result
Returns true if this Result represents a failure.
isSuccess() - Method in class com.guinetik.corefun.Result
Returns true if this Result represents a success.
isValid(Predicate<T>) - Method in interface com.guinetik.corefun.Computable
Validates the value using the specified predicate.

L

lazy(Callable<T>) - Static method in class com.guinetik.corefun.Try
Lazily wraps an operation, executing only when the result is accessed.
Loggable - Interface in com.guinetik.corefun
Interface providing logging capabilities to implementing classes.
Loggable.Logger - Interface in com.guinetik.corefun
A simple, framework-agnostic logger interface.
logger() - Method in interface com.guinetik.corefun.Loggable
Returns the logger for this instance.

M

main(String[]) - Static method in class com.guinetik.corefun.examples.AllExamples
 
main(String[]) - Static method in class com.guinetik.corefun.examples.ComputableExample
 
main(String[]) - Static method in class com.guinetik.corefun.examples.ResultExample
 
main(String[]) - Static method in class com.guinetik.corefun.examples.SafeExecutorExample
 
main(String[]) - Static method in class com.guinetik.corefun.examples.TryExample
 
map(Function<? super S, ? extends T>) - Method in class com.guinetik.corefun.Result
Transforms the success value using the provided function.
map(Function<? super T, ? extends R>) - Method in interface com.guinetik.corefun.Computable
Transforms the value using the provided function.
mapFailure(Function<? super F, ? extends E>) - Method in class com.guinetik.corefun.Result
Transforms the failure value using the provided function.

N

noop() - Static method in interface com.guinetik.corefun.Loggable.Logger
Creates a no-op Logger that discards all messages.
noop() - Static method in interface com.guinetik.corefun.Loggable
Creates a no-op Loggable.
noop() - Static method in interface com.guinetik.corefun.SafeExecutor
Creates a no-op SafeExecutor that doesn't log.
noop() - Static method in interface com.guinetik.corefun.Timing
Creates a Timing instance that discards timing information.

O

of(Loggable.Logger) - Static method in interface com.guinetik.corefun.Loggable
Creates a Loggable that uses the given Logger.
of(Callable<T>) - Static method in class com.guinetik.corefun.Try
Executes an operation and returns a Result with string error messages.
of(Callable<T>, Function<Exception, F>) - Static method in class com.guinetik.corefun.Try
Executes an operation and returns a Result with custom error mapping.
of(Consumer<String>, Consumer<String>, Consumer<String>) - Static method in interface com.guinetik.corefun.Loggable.Logger
Creates a Logger from individual log functions.
of(Consumer<String>, Consumer<String>, Consumer<String>, BiConsumer<String, Throwable>) - Static method in interface com.guinetik.corefun.Loggable.Logger
Creates a Logger with error-with-throwable support.
of(T) - Static method in interface com.guinetik.corefun.Computable
Creates a new Computable wrapping the given value.
of(T) - Static method in interface com.guinetik.corefun.SafeCallable
Creates a SafeCallable that always returns the given value.
ofException(Callable<T>) - Static method in class com.guinetik.corefun.Try
Executes an operation and returns a Result preserving the exception.
onComplete(String, long) - Method in interface com.guinetik.corefun.SafeExecutor
Called when an operation completes successfully.
onError(String, Exception) - Method in interface com.guinetik.corefun.SafeExecutor
Called when an operation fails.
onStart(String) - Method in interface com.guinetik.corefun.SafeExecutor
Called when an operation starts.
onTimed(String, long) - Method in interface com.guinetik.corefun.Timing
Called after an operation completes with timing information.
orElse(T) - Method in interface com.guinetik.corefun.Computable
Returns the value if non-null, otherwise returns the default.

P

peek(Consumer<Object>) - Method in class com.guinetik.corefun.Result
Performs an action on the value (success or failure) without altering the Result.
peek(Consumer<T>) - Method in interface com.guinetik.corefun.Computable
Performs an action on the value without altering it.
peekFailure(Consumer<? super F>) - Method in class com.guinetik.corefun.Result
Performs an action on the failure value if present.
peekSuccess(Consumer<? super S>) - Method in class com.guinetik.corefun.Result
Performs an action on the success value if present.
println() - Static method in interface com.guinetik.corefun.Loggable.Logger
Creates a Logger that prints to stdout/stderr.
println() - Static method in interface com.guinetik.corefun.Loggable
Creates a Loggable that prints to stdout/stderr.
println() - Static method in interface com.guinetik.corefun.SafeExecutor
Creates a SafeExecutor that prints to standard output.
println() - Static method in interface com.guinetik.corefun.Timing
Creates a Timing instance that prints to standard output.

R

recover(Function<? super F, Result<S, F>>) - Method in class com.guinetik.corefun.Result
Recovers from a failure by applying a function that returns a new Result.
reduce(R, BiFunction<R, T, R>) - Method in interface com.guinetik.corefun.Computable
Reduces the value by combining it with an initial value.
Result<S,F> - Class in com.guinetik.corefun
A functional container representing either a success or failure outcome.
ResultExample - Class in com.guinetik.corefun.examples
Demonstrates usage of the Result monad for functional error handling.
ResultExample() - Constructor for class com.guinetik.corefun.examples.ResultExample
 
run() - Method in interface com.guinetik.corefun.SafeRunnable
Executes the operation, potentially throwing a checked exception.
run(SafeRunnable) - Static method in class com.guinetik.corefun.Try
Executes a runnable and returns a Result indicating success or failure.

S

SafeCallable<T> - Interface in com.guinetik.corefun
A functional interface for operations that return a value and may throw checked exceptions.
SafeException - Exception in com.guinetik.corefun
A runtime exception wrapper for checked exceptions.
SafeException(String) - Constructor for exception com.guinetik.corefun.SafeException
Creates a SafeException with just a message.
SafeException(String, Throwable) - Constructor for exception com.guinetik.corefun.SafeException
Creates a SafeException with a message and cause.
SafeException(Throwable) - Constructor for exception com.guinetik.corefun.SafeException
Creates a SafeException wrapping the given cause.
SafeExecutor - Interface in com.guinetik.corefun
Provides safe execution of operations with timing, logging, and error handling.
SafeExecutorExample - Class in com.guinetik.corefun.examples
Demonstrates usage of SafeExecutor for timed, logged operations.
SafeExecutorExample() - Constructor for class com.guinetik.corefun.examples.SafeExecutorExample
 
safely(String, Callable<T>) - Method in interface com.guinetik.corefun.SafeExecutor
Executes a callable safely with timing and error handling.
safelyResult(String, Callable<T>) - Method in interface com.guinetik.corefun.SafeExecutor
Executes an operation and returns a Result instead of throwing.
safelySafe(String, SafeRunnable) - Method in interface com.guinetik.corefun.SafeExecutor
Executes a SafeRunnable safely with timing and error handling.
safelyVoid(String, Runnable) - Method in interface com.guinetik.corefun.SafeExecutor
Executes a runnable safely with timing and error handling.
SafeRunnable - Interface in com.guinetik.corefun
A functional interface for operations that may throw checked exceptions.
sequence(List<Result<S, F>>) - Static method in class com.guinetik.corefun.Result
Converts a list of Results into a Result of a list.
success(S) - Static method in class com.guinetik.corefun.Result
Creates a successful Result containing the given value.

T

tagged(String, Loggable.Logger) - Static method in interface com.guinetik.corefun.Loggable.Logger
Creates a Logger that prefixes all messages with a tag.
timed(String, Callable<T>) - Method in interface com.guinetik.corefun.Timing
Executes a callable and times its execution.
timedSafe(String, SafeRunnable) - Method in interface com.guinetik.corefun.Timing
Executes a SafeRunnable and times its execution.
timedVoid(String, Runnable) - Method in interface com.guinetik.corefun.Timing
Executes a runnable and times its execution.
Timing - Interface in com.guinetik.corefun
Interface for timing the execution of operations.
toResult() - Method in interface com.guinetik.corefun.SafeCallable
Converts this callable to a Result, capturing any exception.
toResultWithMessage() - Method in interface com.guinetik.corefun.SafeCallable
Converts this callable to a Result with a string error message.
toRunnable() - Method in interface com.guinetik.corefun.SafeRunnable
Converts this SafeRunnable to a standard Runnable.
toString() - Method in class com.guinetik.corefun.DefaultComputable
 
trace(String) - Method in interface com.guinetik.corefun.Loggable.Logger
Logs a trace message.
traverse(List<T>, Function<? super T, Result<S, F>>) - Static method in class com.guinetik.corefun.Result
Applies a function to each element and sequences the results.
Try - Class in com.guinetik.corefun
Utility class for executing operations that may fail and converting to Results.
TryExample - Class in com.guinetik.corefun.examples
Demonstrates usage of Try for converting exceptions to Results.
TryExample() - Constructor for class com.guinetik.corefun.examples.TryExample
 

V

validate(Function<? super S, Boolean>, Function<? super S, ? extends F>) - Method in class com.guinetik.corefun.Result
Validates the success value against a predicate.

W

warn(String) - Method in interface com.guinetik.corefun.Loggable.Logger
Logs a warning message.
withLogger(Loggable.Logger) - Static method in interface com.guinetik.corefun.SafeExecutor
Creates a SafeExecutor with the given logger.
wrap(Exception) - Static method in exception com.guinetik.corefun.SafeException
Wraps a checked exception as a SafeException.
wrap(String, Exception) - Static method in exception com.guinetik.corefun.SafeException
Wraps a checked exception with a descriptive message.
A C D E F G H I L M N O P R S T V W 
All Classes and Interfaces|All Packages|Serialized Form