Index
All Classes and Interfaces|All Packages|Serialized Form
A
- accept(T) - Method in interface dmx.fun.CheckedConsumer
-
Performs this operation on the given argument, potentially throwing a checked exception.
- Accessing the value - Section in record class dmx.fun.Accumulator
- accumulated() - Method in record class dmx.fun.Accumulator
-
Returns the value of the
accumulatedrecord component. - Accumulator<E,
A> - Record Class in dmx.fun -
An immutable pair of a computed value
Aand a side-channel accumulationE. - Accumulator(A, E) - Constructor for record class dmx.fun.Accumulator
-
Compact canonical constructor — validates that
accumulatedis non-null. - and(Guard) - Method in interface dmx.fun.Guard
-
Returns a composed guard that requires both this guard and
otherto pass. - append(T) - Method in class dmx.fun.NonEmptyList
-
Returns a new
NonEmptyListwithelementappended at the end. - apply(A, B, C) - Method in interface dmx.fun.TriFunction
-
Applies this function to the given arguments.
- apply(A, B, C, D) - Method in interface dmx.fun.QuadFunction
-
Applies this function to the given arguments.
- apply(T) - Method in interface dmx.fun.CheckedFunction
-
Applies this function to the given argument, potentially throwing a checked exception.
- asPredicate() - Method in interface dmx.fun.Guard
- assertThat(Option) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for an
Option. - assertThat(Result) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for a
Result. - assertThat(Try) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for a
Try. - assertThat(Tuple2) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for a
Tuple2. - assertThat(Tuple3) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for a
Tuple3. - assertThat(Tuple4) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for a
Tuple4. - assertThat(Validated) - Static method in class dmx.fun.assertj.DmxFunAssertions
-
Creates an assertion for a
Validated.
B
- Behaviour contract - Section in class dmx.fun.Resource
C
- cause() - Method in record class dmx.fun.Try.Failure
-
Returns the value of the
causerecord component. - check(T) - Method in interface dmx.fun.Guard
-
Applies this guard to
value. - CheckedConsumer<T> - Interface in dmx.fun
-
A functional interface representing an operation that accepts a single input argument, returns no result, and may throw a checked exception.
- CheckedFunction<T,
R> - Interface in dmx.fun -
A functional interface representing a function that accepts one argument, produces a result, and may throw a checked exception.
- CheckedRunnable - Interface in dmx.fun
-
A functional interface representing a runnable that may throw a checked exception.
- CheckedSupplier<T> - Interface in dmx.fun
-
A functional interface representing a supplier that can produce a value and may throw a checked exception.
- checkToOption(T) - Method in interface dmx.fun.Guard
-
Applies this guard to
valueand returns anOption<T>. - checkToResult(T) - Method in interface dmx.fun.Guard
-
Applies this guard to
valueand returns aResult<T, NonEmptyList<String>>. - checkToResult(T, Function) - Method in interface dmx.fun.Guard
-
Applies this guard to
valueand returns aResult<T, E>, mapping the accumulated error list to a domain-specific error type viatoError. - collector() - Static method in class dmx.fun.NonEmptyList
- collector(BinaryOperator) - Static method in interface dmx.fun.Validated
-
Returns a
Collectorthat accumulates a stream ofValidated<E, A>into a singleValidated<E, List<A>>, collecting all valid values and merging all errors left-to-right usingerrMerge. - collectPresent(Stream) - Static method in interface dmx.fun.Option
-
Collects all present (non-empty) values from a stream of
Optioninstances into a list. - combine(Accumulator, BinaryOperator, BiFunction) - Method in record class dmx.fun.Accumulator
-
Combines this accumulator with
otherby merging their accumulations and applyingfto both values to produce a new value. - combine(Validated, BinaryOperator, BiFunction) - Method in interface dmx.fun.Validated
-
Combines this
Validatedwithother, accumulating errors and merging values. - combine3(Validated, Validated, Validated, BinaryOperator, TriFunction) - Static method in interface dmx.fun.Validated
-
Combines three independent
Validatedvalues, accumulating all errors. - combine4(Validated, Validated, Validated, Validated, BinaryOperator, QuadFunction) - Static method in interface dmx.fun.Validated
-
Combines four independent
Validatedvalues, accumulating all errors. - Composition - Section in class dmx.fun.Resource
- Composition semantics - Section in interface dmx.fun.Guard
- concat(NonEmptyList) - Method in class dmx.fun.NonEmptyList
-
Returns a new
NonEmptyListthat is the concatenation of this list andother. - contains(T) - Method in class dmx.fun.NonEmptySet
-
Returns
trueif this set containselement. - containsError(E) - Method in class dmx.fun.assertj.ResultAssert
-
Verifies that the
ResultisErrand contains the given error. - containsKey(K) - Method in class dmx.fun.NonEmptyMap
-
Returns
trueif this map contains an entry forkey. - containsValue(A) - Method in class dmx.fun.assertj.ValidatedAssert
-
Verifies that the
ValidatedisValidand contains the given value. - containsValue(V) - Method in class dmx.fun.assertj.OptionAssert
-
Verifies that the
OptionisSomeand contains the given value. - containsValue(V) - Method in class dmx.fun.assertj.ResultAssert
-
Verifies that the
ResultisOkand contains the given value. - containsValue(V) - Method in class dmx.fun.assertj.TryAssert
-
Verifies that the
Tryis aSuccessand contains the given value. - contramap(Function) - Method in interface dmx.fun.Guard
-
Returns a
Guard<U>that appliesmapperto its input before checking.
D
- dmx.fun - module dmx.fun
-
Functional programming constructions for Java.
- dmx.fun - package dmx.fun
- dmx.fun.assertj - module dmx.fun.assertj
-
AssertJ custom assertions for dmx-fun types.
- dmx.fun.assertj - package dmx.fun.assertj
- dmx.fun.jackson - module dmx.fun.jackson
-
Jackson serializers and deserializers for dmx-fun types.
- dmx.fun.jackson - package dmx.fun.jackson
- dmx.fun.spring - module dmx.fun.spring
-
Spring Framework integration for dmx-fun types.
- dmx.fun.spring - package dmx.fun.spring
- DmxFunAssertions - Class in dmx.fun.assertj
-
Entry point for AssertJ custom assertions for all dmx-fun types.
- DmxFunModule - Class in dmx.fun.jackson
-
Jackson module that registers serializers and deserializers for all dmx-fun types.
- DmxFunModule() - Constructor for class dmx.fun.jackson.DmxFunModule
-
Constructs a new instance of DmxFunModule.
E
- Either<L,
R> - Interface in dmx.fun -
A disjoint union that is either a
Either.Leftor aEither.Right. - Either.Left<L,
R> - Record Class in dmx.fun -
The left variant of
Either. - Either.Right<L,
R> - Record Class in dmx.fun -
The right variant of
Either. - equals(Object) - Method in record class dmx.fun.Accumulator
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Either.Left
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Either.Right
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class dmx.fun.NonEmptyList
- equals(Object) - Method in class dmx.fun.NonEmptyMap
- equals(Object) - Method in class dmx.fun.NonEmptySet
- equals(Object) - Method in record class dmx.fun.Option.None
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Option.Some
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Result.Err
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Result.Ok
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Result.Partition
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Try.Failure
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Try.Success
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Tuple2
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Tuple3
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Tuple4
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Validated.Invalid
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class dmx.fun.Validated.Valid
-
Indicates whether some other object is "equal to" this one.
- err(Error) - Static method in interface dmx.fun.Result
-
Creates a
Resultinstance representing an erroneous result with the given error value. - err(Error, Class) - Static method in interface dmx.fun.Result
-
Deprecated, for removal: This API element is subject to removal in a future version.
- Err(Error) - Constructor for record class dmx.fun.Result.Err
-
Compact canonical constructor — validates that
erroris non-null. - error() - Method in record class dmx.fun.Result.Err
-
Returns the value of the
errorrecord component. - error() - Method in record class dmx.fun.Validated.Invalid
-
Returns the value of the
errorrecord component. - errors() - Method in record class dmx.fun.Result.Partition
-
Returns the value of the
errorsrecord component. - eval(Try, CheckedConsumer) - Static method in class dmx.fun.Resource
-
Creates a
Resource<T>from a pre-computedTry<T>and a release function. - execute(Supplier) - Method in class dmx.fun.spring.TxResult
-
Executes
actioninside a transaction using the defaultTransactionDefinition(propagation REQUIRED, isolation DEFAULT). - execute(Supplier) - Method in class dmx.fun.spring.TxTry
-
Executes
actioninside a transaction using the defaultTransactionDefinition(propagation REQUIRED, isolation DEFAULT). - execute(Supplier) - Method in class dmx.fun.spring.TxValidated
-
Executes
actioninside a transaction using the defaultTransactionDefinition(propagation REQUIRED, isolation DEFAULT). - execute(TransactionDefinition, Supplier) - Method in class dmx.fun.spring.TxResult
-
Executes
actioninside a transaction configured bydef. - execute(TransactionDefinition, Supplier) - Method in class dmx.fun.spring.TxTry
-
Executes
actioninside a transaction configured bydef. - execute(TransactionDefinition, Supplier) - Method in class dmx.fun.spring.TxValidated
-
Executes
actioninside a transaction configured bydef.
F
- failsWith(Class) - Method in class dmx.fun.assertj.TryAssert
-
Verifies that the
Tryis aFailurecaused by an exception of the given type. - failure(Throwable) - Static method in interface dmx.fun.Try
-
Creates a
Tryinstance representing a failure with the given cause. - Failure(Throwable) - Constructor for record class dmx.fun.Try.Failure
-
Compact canonical constructor — validates that
causeis non-null. - filter(BiPredicate) - Method in class dmx.fun.NonEmptyMap
-
Returns a new
NonEmptyMapcontaining only entries for whichpredicatereturnstrue, wrapped inOption.some(Object). - filter(Predicate) - Method in class dmx.fun.NonEmptySet
-
Returns a new
NonEmptySetcontaining elements that satisfypredicate, wrapped inOption.some(Object). - filter(Predicate) - Method in interface dmx.fun.Option
-
Filters the value of this Option based on the provided predicate.
- filter(Predicate) - Method in interface dmx.fun.Try
-
Filters the Try based on the given predicate.
- filter(Predicate, Function) - Method in interface dmx.fun.Try
-
Filters this
Tryusing a predicate and a contextual error function that receives the value that failed the test. - filter(Predicate, Supplier) - Method in interface dmx.fun.Try
-
Filters the Try based on the given predicate.
- filter(Predicate, Error) - Method in interface dmx.fun.Result
-
Filters the current result based on the specified predicate.
- filter(Predicate, Function) - Method in interface dmx.fun.Result
-
Filters the current result by applying a given predicate to its value.
- flatMap(Function, BinaryOperator) - Method in record class dmx.fun.Accumulator
-
Chains a computation that itself produces an
Accumulator, merging both accumulations usingmerge. - flatMap(Function) - Method in interface dmx.fun.Either
-
Applies
mapperto the right value and returns the resultingEither, leaving aEither.Leftunchanged. - flatMap(Function) - Method in class dmx.fun.Resource
-
Sequences this resource with an inner resource derived from its value.
- flatMap(Function) - Method in class dmx.fun.Lazy
-
Returns a new
Lazyby applyingfto this value and flattening the result. - flatMap(Function) - Method in interface dmx.fun.Option
-
Transforms the current Option value using the provided mapping function and flattens the result.
- flatMap(Function) - Method in interface dmx.fun.Try
-
Applies the provided mapping function to the value contained within this `Try` instance if it represents a successful outcome.
- flatMap(Function) - Method in interface dmx.fun.Validated
-
Fail-fast sequential composition: applies
mapperto the value ifValidated.Valid. - flatMap(Function) - Method in interface dmx.fun.Result
-
Applies the given mapping function to the value of a successful
Resultinstance and returns the resultingResult. - flatMapError(Function) - Method in interface dmx.fun.Try
-
Applies the given mapping function to the cause of a failed
Tryinstance and returns the resultingTry. - flatMapError(Function) - Method in interface dmx.fun.Result
-
Applies a function to the error of an erroneous result and returns the produced
Result. - flatZip(Function) - Method in interface dmx.fun.Option
-
Alias for
Option.zipWith(Function). - fold(Function, Function) - Method in interface dmx.fun.Either
- fold(Function, Function) - Method in interface dmx.fun.Try
-
Folds the current
Tryinstance into a single value by applying one of two provided functions. - fold(Function, Function) - Method in interface dmx.fun.Result
-
Folds this container to a single value by applying the appropriate function.
- fold(Function, Function) - Method in record class dmx.fun.Result.Err
-
Folds this container to a single value by applying the appropriate function.
- fold(Function, Function) - Method in record class dmx.fun.Result.Ok
-
Folds this container to a single value by applying the appropriate function.
- fold(Function, Function) - Method in interface dmx.fun.Validated
-
Folds this container to a single value by applying the appropriate function.
- fold(Function, Function) - Method in record class dmx.fun.Validated.Invalid
-
Folds this container to a single value by applying the appropriate function.
- fold(Function, Function) - Method in record class dmx.fun.Validated.Valid
-
Folds this container to a single value by applying the appropriate function.
- fold(Supplier, Function) - Method in interface dmx.fun.Option
-
Folds the current option into a single value by applying the appropriate function depending on whether the option is a
Someor aNone. - fromAutoCloseable(CheckedSupplier) - Static method in class dmx.fun.Resource
-
Creates a
Resource<T>from anAutoCloseablesupplier. - fromFuture(CompletableFuture) - Static method in class dmx.fun.Lazy
- fromFuture(CompletableFuture) - Static method in interface dmx.fun.Result
-
Converts a
CompletableFutureinto aResultby blocking until the future completes. - fromFuture(CompletableFuture) - Static method in interface dmx.fun.Try
-
Converts a
CompletableFutureinto aTryby blocking until the future completes. - fromList(List) - Static method in class dmx.fun.NonEmptyList
-
Attempts to construct a
NonEmptyListfrom a plainList. - fromMap(Map) - Static method in class dmx.fun.NonEmptyMap
-
Attempts to construct a
NonEmptyMapfrom a plainMap. - fromOption(Option, E) - Static method in interface dmx.fun.Validated
-
Converts an
Optionto aValidated. - fromOption(Option, E) - Static method in interface dmx.fun.Result
- fromOption(Option, Supplier) - Static method in interface dmx.fun.Try
- fromOptional(Optional) - Static method in interface dmx.fun.Result
- fromOptional(Optional, Supplier) - Static method in interface dmx.fun.Try
- fromOptional(Optional) - Static method in interface dmx.fun.Option
- fromResult(Result) - Static method in interface dmx.fun.Option
- fromResult(Result) - Static method in interface dmx.fun.Validated
-
Converts a
Resultto aValidated. - fromResult(Result) - Static method in interface dmx.fun.Try
- fromSet(Set) - Static method in class dmx.fun.NonEmptySet
-
Attempts to construct a
NonEmptySetfrom a plainSet. - fromTry(Try) - Static method in interface dmx.fun.Option
- fromTry(Try, Function) - Static method in interface dmx.fun.Validated
-
Converts a
Tryto aValidated. - fromTry(Try) - Static method in interface dmx.fun.Result
-
Converts a Try instance into a Result instance.
G
- get() - Method in interface dmx.fun.CheckedSupplier
-
Retrieves and returns a value, potentially throwing a checked exception during execution.
- get() - Method in class dmx.fun.Lazy
-
Returns the value, evaluating the supplier on the first call and caching the result.
- get() - Method in interface dmx.fun.Option
-
Retrieves the value held by this
Optioninstance if it is of typeSome. - get() - Method in interface dmx.fun.Result
-
Retrieves the value contained within this
Resultinstance if it represents a successful result. - get() - Method in interface dmx.fun.Try
-
Retrieves the value encapsulated in this instance if it represents a success.
- get() - Method in interface dmx.fun.Validated
-
Retrieves the value if this is
Validated.Valid. - get(K) - Method in class dmx.fun.NonEmptyMap
-
Returns the value associated with
key, orOption.none()if absent. - getCause() - Method in interface dmx.fun.Try
-
Retrieves the cause of failure if the instance represents a failed state.
- getError() - Method in interface dmx.fun.Result
-
Retrieves the error value of the current instance if it is an Err.
- getError() - Method in interface dmx.fun.Validated
-
Retrieves the error if this is
Validated.Invalid. - getLeft() - Method in interface dmx.fun.Either
-
Returns the left value.
- getOrElse(Value) - Method in interface dmx.fun.Result
-
Returns the success value if present, or
fallbackotherwise. - getOrElse(Value) - Method in record class dmx.fun.Result.Err
-
Returns the success value if present, or
fallbackotherwise. - getOrElse(Value) - Method in record class dmx.fun.Result.Ok
-
Returns the success value if present, or
fallbackotherwise. - getOrElse(A) - Method in interface dmx.fun.Validated
-
Returns the success value if present, or
fallbackotherwise. - getOrElse(A) - Method in record class dmx.fun.Validated.Invalid
-
Returns the success value if present, or
fallbackotherwise. - getOrElse(A) - Method in record class dmx.fun.Validated.Valid
-
Returns the success value if present, or
fallbackotherwise. - getOrElse(Value) - Method in interface dmx.fun.Option
-
Retrieves the encapsulated value if this
Optioninstance is of typeSome, or returns the provided fallback value if this instance is of typeNone. - getOrElse(Value) - Method in interface dmx.fun.Try
-
Returns the value if this instance is a
Success, or the specified fallback value if it is aFailure. - getOrElseGet(Supplier) - Method in interface dmx.fun.Option
-
Retrieves the encapsulated value if this
Optioninstance is of typeSome, or computes and returns a fallback value supplied by the givenfallbackSupplierif this instance is of typeNone. - getOrElseGet(Supplier) - Method in interface dmx.fun.Try
-
Returns the value of this
Tryif it is aSuccess, or retrieves a fallback value using the providedfallbackSupplierif it is aFailure. - getOrElseGet(Supplier) - Method in interface dmx.fun.Result
-
Returns the success value if present, or the value produced by
supplierotherwise. - getOrElseGet(Supplier) - Method in record class dmx.fun.Result.Err
-
Returns the success value if present, or the value produced by
supplierotherwise. - getOrElseGet(Supplier) - Method in record class dmx.fun.Result.Ok
-
Returns the success value if present, or the value produced by
supplierotherwise. - getOrElseGet(Supplier) - Method in interface dmx.fun.Validated
-
Returns the success value if present, or the value produced by
supplierotherwise. - getOrElseGet(Supplier) - Method in record class dmx.fun.Validated.Invalid
-
Returns the success value if present, or the value produced by
supplierotherwise. - getOrElseGet(Supplier) - Method in record class dmx.fun.Validated.Valid
-
Returns the success value if present, or the value produced by
supplierotherwise. - getOrElseGetWithError(Function) - Method in interface dmx.fun.Result
-
Returns the value of this
Ok, or applieserrorMapperto the contained error and returns the result. - getOrNull() - Method in interface dmx.fun.Result
-
Returns the success value if present, or
nullotherwise. - getOrNull() - Method in record class dmx.fun.Result.Err
-
Returns the success value if present, or
nullotherwise. - getOrNull() - Method in record class dmx.fun.Result.Ok
-
Returns the success value if present, or
nullotherwise. - getOrNull() - Method in interface dmx.fun.Validated
-
Returns the success value if present, or
nullotherwise. - getOrNull() - Method in record class dmx.fun.Validated.Invalid
-
Returns the success value if present, or
nullotherwise. - getOrNull() - Method in record class dmx.fun.Validated.Valid
-
Returns the success value if present, or
nullotherwise. - getOrNull() - Method in interface dmx.fun.Option
-
Retrieves the encapsulated value if this
Optioninstance is of typeSome, or returnsnullif this instance is of typeNone. - getOrNull() - Method in interface dmx.fun.Try
-
Returns the value of this
Tryif it is aSuccess, ornullif it is aFailure. - getOrThrow() - Method in interface dmx.fun.Try
-
Returns the successful value if this instance is a
Success, or throws an exception if this instance is aFailure. - getOrThrow(Function) - Method in interface dmx.fun.Try
-
Returns the value if this instance is a Success, or throws the exception provided by the exceptionMapper if this instance is a Failure.
- getOrThrow(Function) - Method in interface dmx.fun.Result
-
Returns the success value if present, or throws an exception mapped from the error.
- getOrThrow(Function) - Method in record class dmx.fun.Result.Err
-
Returns the success value if present, or throws an exception mapped from the error.
- getOrThrow(Function) - Method in record class dmx.fun.Result.Ok
-
Returns the success value if present, or throws an exception mapped from the error.
- getOrThrow(Function) - Method in interface dmx.fun.Validated
-
Returns the success value if present, or throws an exception mapped from the error.
- getOrThrow(Function) - Method in record class dmx.fun.Validated.Invalid
-
Returns the success value if present, or throws an exception mapped from the error.
- getOrThrow(Function) - Method in record class dmx.fun.Validated.Valid
-
Returns the success value if present, or throws an exception mapped from the error.
- getOrThrow(Supplier) - Method in interface dmx.fun.Option
-
Retrieves the encapsulated value if this
Optioninstance is of typeSome. - getRight() - Method in interface dmx.fun.Either
-
Returns the right value.
- groupingBy(Function) - Static method in interface dmx.fun.Result
-
Returns a
Collectorthat groups stream elements by a key derived from each element. - groupingBy(Function, Function) - Static method in interface dmx.fun.Result
-
Returns a
Collectorthat groups stream elements by a key derived from each element and applies a downstream function to each group'sNonEmptyList. - Guard<T> - Interface in dmx.fun
-
A named, composable predicate that produces a
Validatedresult when applied to a value.
H
- hasError(E) - Method in class dmx.fun.assertj.ValidatedAssert
-
Verifies that the
ValidatedisInvalidand contains the given error. - hasFirst(A) - Method in class dmx.fun.assertj.Tuple2Assert
-
Verifies that the first element equals the given value.
- hasFirst(A) - Method in class dmx.fun.assertj.Tuple3Assert
-
Verifies that the first element equals the given value.
- hasFirst(A) - Method in class dmx.fun.assertj.Tuple4Assert
-
Verifies that the first element equals the given value.
- hasFourth(D) - Method in class dmx.fun.assertj.Tuple4Assert
-
Verifies that the fourth element equals the given value.
- hashCode() - Method in record class dmx.fun.Accumulator
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Either.Left
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Either.Right
-
Returns a hash code value for this object.
- hashCode() - Method in class dmx.fun.NonEmptyList
- hashCode() - Method in class dmx.fun.NonEmptyMap
- hashCode() - Method in class dmx.fun.NonEmptySet
- hashCode() - Method in record class dmx.fun.Option.None
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Option.Some
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Result.Err
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Result.Ok
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Result.Partition
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Try.Failure
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Try.Success
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Tuple2
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Tuple3
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Tuple4
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Validated.Invalid
-
Returns a hash code value for this object.
- hashCode() - Method in record class dmx.fun.Validated.Valid
-
Returns a hash code value for this object.
- hasSecond(B) - Method in class dmx.fun.assertj.Tuple2Assert
-
Verifies that the second element equals the given value.
- hasSecond(B) - Method in class dmx.fun.assertj.Tuple3Assert
-
Verifies that the second element equals the given value.
- hasSecond(B) - Method in class dmx.fun.assertj.Tuple4Assert
-
Verifies that the second element equals the given value.
- hasThird(C) - Method in class dmx.fun.assertj.Tuple3Assert
-
Verifies that the third element equals the given value.
- hasThird(C) - Method in class dmx.fun.assertj.Tuple4Assert
-
Verifies that the third element equals the given value.
- hasValue() - Method in record class dmx.fun.Accumulator
-
Returns
trueif this accumulator was created withAccumulator.of(Object, Object)orAccumulator.pure(Object, Object)and therefore carries a non-null value. - hasValueSatisfying(Consumer) - Method in class dmx.fun.assertj.OptionAssert
-
Verifies that the
OptionisSomeand that its value satisfies the given requirement. - head() - Method in class dmx.fun.NonEmptyList
-
Returns the first element of this list.
- head() - Method in class dmx.fun.NonEmptySet
-
Returns the guaranteed head element of this set (the first inserted element).
- headKey() - Method in class dmx.fun.NonEmptyMap
-
Returns the guaranteed head key of this map.
- headValue() - Method in class dmx.fun.NonEmptyMap
-
Returns the value associated with the head key.
I
- intersection(Set) - Method in class dmx.fun.NonEmptySet
-
Returns a new
NonEmptySetcontaining only elements present in both this set andother, wrapped inOption.some(Object). - invalid(E) - Static method in interface dmx.fun.Validated
-
Creates an
Validated.Invalidinstance wrapping the given error. - Invalid(E) - Constructor for record class dmx.fun.Validated.Invalid
-
Compact canonical constructor — validates that
erroris non-null. - invalidNel(E) - Static method in interface dmx.fun.Validated
- isDefined() - Method in interface dmx.fun.Option
-
Determines whether this instance represents a defined value.
- isEmpty() - Method in interface dmx.fun.Option
-
Checks if this
Optioninstance represents the absence of a value. - isErr() - Method in class dmx.fun.assertj.ResultAssert
-
Verifies that the
ResultisErr. - isError() - Method in interface dmx.fun.Result
-
Returns
trueif this instance is the error (Result.Err) variant. - isEvaluated() - Method in class dmx.fun.Lazy
-
Returns
trueif the supplier has already been evaluated. - isFailure() - Method in class dmx.fun.assertj.TryAssert
-
Verifies that the
Tryis aFailure. - isFailure() - Method in interface dmx.fun.Try
-
Determines if the current instance represents a failure state.
- isInvalid() - Method in class dmx.fun.assertj.ValidatedAssert
-
Verifies that the
ValidatedisInvalid. - isInvalid() - Method in interface dmx.fun.Validated
-
Returns
trueif this instance isValidated.Invalid. - isLeft() - Method in interface dmx.fun.Either
-
Returns
trueif this is aEither.Left. - isNone() - Method in class dmx.fun.assertj.OptionAssert
-
Verifies that the
OptionisNone. - isOk() - Method in class dmx.fun.assertj.ResultAssert
-
Verifies that the
ResultisOk. - isOk() - Method in interface dmx.fun.Result
-
Checks if the current instance represents a successful result.
- isRight() - Method in interface dmx.fun.Either
-
Returns
trueif this is aEither.Right. - isSome() - Method in class dmx.fun.assertj.OptionAssert
-
Verifies that the
OptionisSome. - isSuccess() - Method in class dmx.fun.assertj.TryAssert
-
Verifies that the
Tryis aSuccess. - isSuccess() - Method in interface dmx.fun.Result
-
Returns
trueif this instance is the success (Result.Ok) variant. - isSuccess() - Method in interface dmx.fun.Try
-
Determines if the current instance represents a successful state.
- isSuccess() - Method in interface dmx.fun.Validated
-
Returns
trueif this instance is the success (Validated.Valid) variant. - isValid() - Method in class dmx.fun.assertj.ValidatedAssert
-
Verifies that the
ValidatedisValid. - isValid() - Method in interface dmx.fun.Validated
-
Returns
trueif this instance isValidated.Valid. - iterator() - Method in class dmx.fun.NonEmptyList
-
Returns an iterator over all elements (head first, then tail).
- iterator() - Method in class dmx.fun.NonEmptySet
-
Returns an iterator over all elements (head first, then tail in insertion order).
K
- keySet() - Method in class dmx.fun.NonEmptyMap
-
Returns a
NonEmptySetcontaining all keys of this map in insertion order.
L
- Lazy<T> - Class in dmx.fun
-
A lazily evaluated value that is computed at most once.
- left(L) - Static method in interface dmx.fun.Either
-
Creates a
Either.Leftinstance wrapping the given value. - Left(L) - Constructor for record class dmx.fun.Either.Left
-
Validates that
valueis non-null. - liftOption(Option, Function, E) - Static method in record class dmx.fun.Accumulator
-
Lifts an
Optionvalue into anAccumulator, recording a log entry for both the present and absent cases. - liftTry(Try, Function, Function) - Static method in record class dmx.fun.Accumulator
-
Lifts a
Tryvalue into anAccumulator, recording a log entry viasuccessLogon success orfailureLogon failure.
M
- map(QuadFunction) - Method in record class dmx.fun.Tuple4
-
Collapses this quadruple into a single value by applying
fto all four elements. - map(TriFunction) - Method in record class dmx.fun.Tuple3
-
Collapses this triple into a single value by applying
fto all three elements. - map(Function) - Method in record class dmx.fun.Accumulator
-
Transforms the value, leaving the accumulation unchanged.
- map(Function) - Method in interface dmx.fun.Either
-
Maps the right value using
mapper, leaving aEither.Leftunchanged. - map(Function) - Method in class dmx.fun.Lazy
-
Returns a new
Lazythat appliesfto this value when evaluated. - map(Function) - Method in class dmx.fun.NonEmptyList
-
Applies
mapperto every element and returns a newNonEmptyListof the results. - map(Function) - Method in class dmx.fun.NonEmptySet
-
Applies
mapperto every element and returns a newNonEmptySetof the results. - map(Function) - Method in class dmx.fun.Resource
-
Returns a new
Resource<R>whose body receives the result of applyingfnto the acquired value. - map(Function) - Method in interface dmx.fun.Option
-
Transforms the current Option using the provided mapping function.
- map(Function) - Method in interface dmx.fun.Try
-
Transforms the value held by this instance using the provided mapping function.
- map(Function) - Method in interface dmx.fun.Validated
- map(Function) - Method in interface dmx.fun.Result
-
Transforms the value of a successful
Resultinstance using the provided mapping function. - map2(Option, Option, BiFunction) - Static method in interface dmx.fun.Option
-
Combines the values of two Option instances using the provided combiner function.
- map3(Option, Option, Option, TriFunction) - Static method in interface dmx.fun.Option
-
Combines the values of three
Optioninstances using the providedTriFunction. - map4(Option, Option, Option, Option, QuadFunction) - Static method in interface dmx.fun.Option
-
Combines the values of four
Optioninstances using the providedQuadFunction. - mapAccumulated(Function) - Method in record class dmx.fun.Accumulator
-
Transforms the accumulation, leaving the value unchanged.
- mapError(Function) - Method in interface dmx.fun.Validated
- mapError(Function) - Method in interface dmx.fun.Result
-
Transforms the error value of an erroneous
Resultinstance using the provided mapping function. - mapFailure(Function) - Method in interface dmx.fun.Try
-
Transforms the failure cause using the given function, leaving a
Successunchanged. - mapFirst(Function) - Method in record class dmx.fun.Tuple3
-
Returns a new tuple with
fapplied to the first element; the other elements are unchanged. - mapFirst(Function) - Method in record class dmx.fun.Tuple4
-
Returns a new tuple with
fapplied to the first element; the other elements are unchanged. - mapFourth(Function) - Method in record class dmx.fun.Tuple4
-
Returns a new tuple with
fapplied to the fourth element; the other elements are unchanged. - mapKeys(Function) - Method in class dmx.fun.NonEmptyMap
-
Applies
mapperto every key and returns a newNonEmptyMapwith the mapped keys and the original values. - mapLeft(Function) - Method in interface dmx.fun.Either
-
Maps the left value using
mapper, leaving aEither.Rightunchanged. - mapSecond(Function) - Method in record class dmx.fun.Tuple3
-
Returns a new tuple with
fapplied to the second element; the other elements are unchanged. - mapSecond(Function) - Method in record class dmx.fun.Tuple4
-
Returns a new tuple with
fapplied to the second element; the other elements are unchanged. - mapThird(Function) - Method in record class dmx.fun.Tuple3
-
Returns a new tuple with
fapplied to the third element; the other elements are unchanged. - mapThird(Function) - Method in record class dmx.fun.Tuple4
-
Returns a new tuple with
fapplied to the third element; the other elements are unchanged. - mapTry(Function) - Method in class dmx.fun.Resource
-
Returns a new
Resource<R>whose value is obtained by applying aTry-returning function to the acquired value. - mapValues(Function) - Method in class dmx.fun.NonEmptyMap
-
Applies
mapperto every value and returns a newNonEmptyMapwith the same keys and mapped values. - match(Runnable, Consumer) - Method in interface dmx.fun.Option
-
Executes one of the provided actions based on the state of this value.
- match(Consumer, Consumer) - Method in interface dmx.fun.Result
-
Executes one of the two consumers based on the active variant.
- match(Consumer, Consumer) - Method in record class dmx.fun.Result.Err
-
Executes one of the two consumers based on the active variant.
- match(Consumer, Consumer) - Method in record class dmx.fun.Result.Ok
-
Executes one of the two consumers based on the active variant.
- match(Consumer, Consumer) - Method in interface dmx.fun.Validated
-
Executes one of the two consumers based on the active variant.
- match(Consumer, Consumer) - Method in record class dmx.fun.Validated.Invalid
-
Executes one of the two consumers based on the active variant.
- match(Consumer, Consumer) - Method in record class dmx.fun.Validated.Valid
-
Executes one of the two consumers based on the active variant.
- merge(NonEmptyMap, BinaryOperator) - Method in class dmx.fun.NonEmptyMap
-
Returns a new
NonEmptyMapthat is the union of this map andother.
N
- negate() - Method in interface dmx.fun.Guard
-
Returns a guard that is the logical negation of this guard, using a generic error message.
- negate(String) - Method in interface dmx.fun.Guard
-
Returns a guard that is the logical negation of this guard, using the supplied error message when the original guard passes.
- none() - Static method in interface dmx.fun.Option
-
Creates an instance of
Optionthat represents the absence of a value. - None() - Constructor for record class dmx.fun.Option.None
-
Creates an instance of a
Nonerecord class. - NonEmptyList<T> - Class in dmx.fun
-
An immutable, non-empty list: a list guaranteed at construction time to contain at least one element.
- NonEmptyMap<K,
V> - Class in dmx.fun -
An immutable, non-empty map: a map guaranteed at construction time to contain at least one entry.
- NonEmptySet<T> - Class in dmx.fun
-
An immutable, non-empty set: a set guaranteed at construction time to contain at least one element.
O
- of(A, B, C) - Static method in record class dmx.fun.Tuple3
-
Creates a new
Tuple3with the given elements. - of(A, B, C, D) - Static method in record class dmx.fun.Tuple4
-
Creates a new
Tuple4with the given elements. - of(A, E) - Static method in record class dmx.fun.Accumulator
-
Creates an
Accumulatorpairing a computed value with an initial accumulation. - of(CheckedSupplier, CheckedConsumer) - Static method in class dmx.fun.Resource
-
Creates a
Resource<T>from explicit acquire and release functions. - of(CheckedSupplier) - Static method in interface dmx.fun.Try
-
Creates a
Tryinstance by executing the givenCheckedSupplier. - of(Predicate, String) - Static method in interface dmx.fun.Guard
-
Creates a
Guard<T>from a predicate and a static error message. - of(Predicate, Function) - Static method in interface dmx.fun.Guard
-
Creates a
Guard<T>from a predicate and a dynamic error message function. - of(Supplier) - Static method in class dmx.fun.Lazy
- of(K, V, Map) - Static method in class dmx.fun.NonEmptyMap
-
Creates a
NonEmptyMapwith the given head entry and additional entries. - of(T, List) - Static method in class dmx.fun.NonEmptyList
-
Creates a
NonEmptyListwith the given head and tail. - of(T, Set) - Static method in class dmx.fun.NonEmptySet
-
Creates a
NonEmptySetwith the given head element and additional elements. - ofNullable(V) - Static method in interface dmx.fun.Option
-
Creates an Option instance that encapsulates a given value.
- ok(Value) - Static method in interface dmx.fun.Result
-
Creates a
Resultinstance representing a successful result with the given value. - ok(Value, Class) - Static method in interface dmx.fun.Result
-
Deprecated, for removal: This API element is subject to removal in a future version.This overload exists only as a type-inference aid and is no longer needed. Use
Result.ok(Object)with an explicit type witness or a typed variable instead:Result.<Value, Error>ok(value)orResult<Value, Error> r = Result.ok(value) - Ok(Value) - Constructor for record class dmx.fun.Result.Ok
-
Compact canonical constructor — validates that
valueis non-null. - oks() - Method in record class dmx.fun.Result.Partition
-
Returns the value of the
oksrecord component. - onFailure(Consumer) - Method in interface dmx.fun.Try
-
Executes a specified action if this instance represents a failure.
- onSuccess(Consumer) - Method in interface dmx.fun.Try
-
Performs the given action if the current instance represents a successful outcome.
- Option<Value> - Interface in dmx.fun
-
A sealed interface representing an optional value with two possible states: either a value is present ("Some") or absent ("None").
- Option.None<Value> - Record Class in dmx.fun
-
Represents a variant of the
Optiontype that signifies the absence of a value. - Option.Some<Value> - Record Class in dmx.fun
-
Represents a container object that holds a non-null value.
- OptionAssert<V> - Class in dmx.fun.assertj
-
AssertJ assertions for
Option. - or(Guard) - Method in interface dmx.fun.Guard
-
Returns a composed guard that passes when at least one of this guard or
otherpasses. - or(Supplier) - Method in interface dmx.fun.Result
-
Returns this
Resultif it isOk; otherwise evaluates the given supplier and returns its result. - orElse(Option) - Method in interface dmx.fun.Option
-
Returns this
Optionif it isSome, otherwise returnsalternative. - orElse(Result) - Method in interface dmx.fun.Result
-
Returns this
Resultif it isOk, otherwise returnsalternative. - orElse(Supplier) - Method in interface dmx.fun.Option
-
Returns this
Optionif it isSome, otherwise evaluates and returns the supplier's result. - orElse(Supplier) - Method in interface dmx.fun.Result
-
Returns this
Resultif it isOk, otherwise evaluates and returns the supplier's result.
P
- Partition(List, List) - Constructor for record class dmx.fun.Result.Partition
-
Defensively copies both lists and null-checks them.
- partitioningBy() - Static method in interface dmx.fun.Result
-
Returns a
Collectorthat partitions aStream<Result<V, E>>into two typed lists:Result.Partition.oks()for values fromOkelements, andResult.Partition.errors()for errors fromErrelements. - peek(Consumer) - Method in interface dmx.fun.Either
- peek(Consumer) - Method in interface dmx.fun.Option
-
Applies the provided action to the value contained in this instance if it is of type Some.
- peek(Consumer) - Method in interface dmx.fun.Validated
- peek(Consumer) - Method in interface dmx.fun.Result
-
Executes the given action if the current
Resultinstance represents a successful result. - peekError(Consumer) - Method in interface dmx.fun.Validated
- peekError(Consumer) - Method in interface dmx.fun.Result
-
Executes the given action if the current
Resultinstance represents an erroneous result. - peekLeft(Consumer) - Method in interface dmx.fun.Either
- prepend(T) - Method in class dmx.fun.NonEmptyList
-
Returns a new
NonEmptyListwithelementprepended at the front. - presentValuesToList() - Static method in interface dmx.fun.Option
-
Creates a collector that transforms a stream of Option objects into a list of values by extracting the present values and filtering out any absent values.
- product(Validated, BinaryOperator) - Method in interface dmx.fun.Validated
-
Combines this
Validatedwithother, accumulating errors when both are invalid. - pure(A, E) - Static method in record class dmx.fun.Accumulator
-
Creates an
Accumulatorwith a value and an empty (identity) accumulation.
Q
- QuadFunction<A,
B, - Interface in dmx.funC, D, R> -
A functional interface for a function that accepts four arguments and produces a result.
- Quick start - Section in class dmx.fun.spring.TxResult
- Quick start - Section in class dmx.fun.spring.TxTry
- Quick start - Section in class dmx.fun.spring.TxValidated
- Quick start - Section in record class dmx.fun.Accumulator
R
- recover(Class, Function) - Method in interface dmx.fun.Try
-
Recovers from a failure if — and only if — the exception is an instance of
exceptionType, applying the recovery function to produce a new success value. - recover(Function) - Method in interface dmx.fun.Try
-
Recovers from a failure by applying a recovery function to the underlying throwable.
- recover(Function) - Method in interface dmx.fun.Result
-
Converts an erroneous
Resultinto a successful one by applying the given rescue function to the contained error. - recoverWith(Class, Function) - Method in interface dmx.fun.Try
-
Recovers from a failure if — and only if — the exception is an instance of
exceptionType, by applying the recovery function which returns a newTry<Value>for chaining further fallible computations. - recoverWith(Function) - Method in interface dmx.fun.Try
-
Recovers from a failure by applying the given recovery function to the cause of the failure.
- recoverWith(Function) - Method in interface dmx.fun.Result
-
Converts an erroneous
Resultinto a newResultby applying the given rescue function to the contained error. - Resource<T> - Class in dmx.fun
-
A functional managed resource: a value that must be acquired before use and released afterward.
- Result<Value,
Error> - Interface in dmx.fun -
A generic sealed interface representing a result type that can either be a successful value (
Result.Ok) or an error (Result.Err). - Result.Err<Value,
Error> - Record Class in dmx.fun -
Represents an erroneous result containing an error of type
Error. - Result.Ok<Value,
Error> - Record Class in dmx.fun -
Represents a successful result containing a value of type
Value. - Result.Partition<V,
E> - Record Class in dmx.fun -
A typed container holding the two partitions produced by
Result.partitioningBy(). - ResultAssert<V,
E> - Class in dmx.fun.assertj -
AssertJ assertions for
Result. - right(R) - Static method in interface dmx.fun.Either
-
Creates a
Either.Rightinstance wrapping the given value. - Right(R) - Constructor for record class dmx.fun.Either.Right
-
Validates that
valueis non-null. - run() - Method in interface dmx.fun.CheckedRunnable
-
Executes an operation that may throw a checked exception.
- run(CheckedRunnable) - Static method in interface dmx.fun.Try
-
Executes the provided
CheckedRunnableand returns aTryinstance representing the outcome of the execution.
S
- sequence(NonEmptyList) - Static method in class dmx.fun.NonEmptyList
- sequence(Iterable) - Static method in interface dmx.fun.Option
-
Transforms an iterable of
Option<V>into a singleOption<List<V>>. - sequence(Iterable) - Static method in interface dmx.fun.Result
-
Transforms an iterable of
Result<V, E>into a singleResult<List<V>, E>. - sequence(Iterable) - Static method in interface dmx.fun.Try
-
Transforms an iterable of
Try<V>into a singleTry<List<V>>. - sequence(Iterable, BinaryOperator) - Static method in interface dmx.fun.Validated
-
Transforms an iterable of
Validated<E, A>into a singleValidated<E, List<A>>. - sequence(List, BinaryOperator, E) - Static method in record class dmx.fun.Accumulator
-
Folds a list of accumulators into a single
Accumulator<E, List<A>>, merging all accumulations left-to-right usingmerge, starting fromempty. - sequence(Stream) - Static method in interface dmx.fun.Option
-
Converts a stream of
Optionobjects into a singleOptioncontaining aListof values, if allOptioninstances in the stream areOption.Some. - sequence(Stream) - Static method in interface dmx.fun.Result
-
Transforms a stream of
Result<V, E>into a singleResult<List<V>, E>. - sequence(Stream) - Static method in interface dmx.fun.Try
-
Transforms a stream of
Try<V>into a singleTry<List<V>>. - sequence(Stream, BinaryOperator) - Static method in interface dmx.fun.Validated
-
Transforms a stream of
Validated<E, A>into a singleValidated<E, List<A>>. - sequenceCollector() - Static method in interface dmx.fun.Option
- sequenceNel(Iterable) - Static method in interface dmx.fun.Validated
-
Sequences an
IterableofValidated<NonEmptyList<E>, A>into a singleValidated<NonEmptyList<E>, List<A>>, accumulating all errors usingNonEmptyList.concat(NonEmptyList). - singleton(K, V) - Static method in class dmx.fun.NonEmptyMap
-
Creates a
NonEmptyMapcontaining exactly one entry. - singleton(T) - Static method in class dmx.fun.NonEmptyList
-
Creates a
NonEmptyListcontaining exactly one element. - singleton(T) - Static method in class dmx.fun.NonEmptySet
-
Creates a
NonEmptySetcontaining exactly one element. - size() - Method in class dmx.fun.NonEmptyList
-
Returns the number of elements in this list.
- size() - Method in class dmx.fun.NonEmptyMap
-
Returns the number of entries in this map.
- size() - Method in class dmx.fun.NonEmptySet
-
Returns the number of elements in this set.
- some(V) - Static method in interface dmx.fun.Option
-
Creates a
Option.Someinstance that encapsulates the given non-null value. - Some(Value) - Constructor for record class dmx.fun.Option.Some
-
Constructs a new
Someinstance with the specified non-null value. - stream() - Method in interface dmx.fun.Result
-
Returns a single-element stream of the success value, or an empty stream on error.
- stream() - Method in record class dmx.fun.Result.Err
-
Returns a single-element stream of the success value, or an empty stream on error.
- stream() - Method in record class dmx.fun.Result.Ok
-
Returns a single-element stream of the success value, or an empty stream on error.
- stream() - Method in interface dmx.fun.Validated
-
Returns a single-element stream of the success value, or an empty stream on error.
- stream() - Method in record class dmx.fun.Validated.Invalid
-
Returns a single-element stream of the success value, or an empty stream on error.
- stream() - Method in record class dmx.fun.Validated.Valid
-
Returns a single-element stream of the success value, or an empty stream on error.
- stream() - Method in interface dmx.fun.Option
-
Returns a stream representation of the current instance.
- stream() - Method in interface dmx.fun.Try
-
Returns a single-element
Streamcontaining the success value, or an empty stream on failure. - success(V) - Static method in interface dmx.fun.Try
-
Creates a successful
Tryinstance containing the provided value. - Success(Value) - Constructor for record class dmx.fun.Try.Success
-
Creates an instance of a
Successrecord class. - swap() - Method in interface dmx.fun.Either
-
Swaps the two sides:
Either.LeftbecomesEither.Rightand vice-versa. - swap() - Method in interface dmx.fun.Result
-
Swaps the
OkandErrchannels of thisResult.
T
- tail() - Method in class dmx.fun.NonEmptyList
-
Returns an unmodifiable view of all elements after the head.
- tell(E) - Static method in record class dmx.fun.Accumulator
-
Creates an
Accumulatorthat records something without producing a meaningful value. - toEither() - Method in interface dmx.fun.Result
-
Converts this
Resultto anEither. - toEither() - Method in interface dmx.fun.Try
-
Converts this
Tryto anEither. - toEither() - Method in interface dmx.fun.Validated
-
Converts this
Validatedto anEither. - toEither(L) - Method in interface dmx.fun.Option
-
Converts this
Optionto anEither. - toFuture() - Method in class dmx.fun.Lazy
-
Converts this
Lazyinto aCompletableFuture. - toFuture() - Method in interface dmx.fun.Result
-
Converts this
Resultinto an already-completedCompletableFuture. - toFuture() - Method in interface dmx.fun.Try
-
Converts this
Tryinto an already-completedCompletableFuture. - toFuture(Function) - Method in interface dmx.fun.Result
-
Converts this
Resultinto an already-completedCompletableFuture, usingerrorMapperto convert the error value into aThrowablewhen this isErr. - toList() - Method in class dmx.fun.NonEmptyList
-
Returns an unmodifiable
Listcontaining all elements (head followed by tail). - toList() - Static method in interface dmx.fun.Result
- toMap() - Method in class dmx.fun.NonEmptyMap
-
Returns an unmodifiable
Mapcontaining all entries (head entry first, then tail entries in insertion order). - toNonEmptyList() - Static method in class dmx.fun.NonEmptyList
-
Alias for
NonEmptyList.collector(). - toNonEmptyList() - Method in class dmx.fun.NonEmptyMap
-
Converts this map to a
NonEmptyListof its entries in insertion order. - toNonEmptyList() - Method in class dmx.fun.NonEmptySet
-
Converts this set to a
NonEmptyListof its elements in insertion order. - toNonEmptyMap(Function) - Method in class dmx.fun.NonEmptySet
-
Returns a
NonEmptyMapby applyingvalueMapperto each element of this set. - toNonEmptySet() - Method in class dmx.fun.NonEmptyList
-
Converts this list to a
NonEmptySet, preserving the head element and deduplicating the tail in insertion order. - toOption() - Method in record class dmx.fun.Accumulator
-
Returns the value wrapped in
Option.some(Object), orOption.none()if this accumulator was created byAccumulator.tell(Object)and has no value. - toOption() - Method in interface dmx.fun.Result
-
Converts this container to an
Option. - toOption() - Method in record class dmx.fun.Result.Err
-
Converts this container to an
Option. - toOption() - Method in record class dmx.fun.Result.Ok
-
Converts this container to an
Option. - toOption() - Method in interface dmx.fun.Validated
-
Converts this container to an
Option. - toOption() - Method in record class dmx.fun.Validated.Invalid
-
Converts this container to an
Option. - toOption() - Method in record class dmx.fun.Validated.Valid
-
Converts this container to an
Option. - toOption() - Method in interface dmx.fun.Either
-
Converts this
Eitherto anOption:Either.RightbecomesOption.some(Object),Either.LeftbecomesOption.none(). - toOption() - Method in class dmx.fun.Lazy
-
Evaluates this
Lazyand wraps the result in anOption. - toOption() - Method in interface dmx.fun.Try
-
Converts the current instance to an Option.
- toOptional() - Method in interface dmx.fun.Option
-
Converts the current instance of a value or none container into an
Optional. - toResult() - Method in record class dmx.fun.Accumulator
-
Converts this accumulator to a
Result:Result.ok(Object)whenAccumulator.hasValue()istrue, orResult.err(Object)carrying the accumulated side-channel when this accumulator was created byAccumulator.tell(Object). - toResult() - Method in interface dmx.fun.Either
-
Converts this
Eitherto aResult. - toResult() - Method in class dmx.fun.Lazy
-
Evaluates this
Lazyinside aResult, capturing any exception thrown by the supplier asErr(Throwable). - toResult() - Method in interface dmx.fun.Try
-
Converts the current
Tryinstance into aResultrepresentation. - toResult() - Method in interface dmx.fun.Validated
-
Converts this
Validatedto aResult. - toResult(Function) - Method in class dmx.fun.Lazy
-
Evaluates this
Lazyinside aResult, converting any exception thrown by the supplier into a typed error usingerrorMapper. - toResult(Function) - Method in interface dmx.fun.Try
-
Converts this
Tryinto aResult<Value, E>using a custom error mapper. - toResult(TError) - Method in interface dmx.fun.Option
-
Converts the current option to a
Resultinstance. - toSet() - Method in class dmx.fun.NonEmptySet
-
Returns an unmodifiable
Setcontaining all elements (head first, then tail in insertion order). - toStream() - Method in class dmx.fun.NonEmptyList
-
Returns a sequential
Streamof all elements (head first, then tail). - toString() - Method in record class dmx.fun.Accumulator
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Either.Left
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Either.Right
-
Returns a string representation of this record class.
- toString() - Method in class dmx.fun.Lazy
-
Returns a string representation of this
Lazy. - toString() - Method in class dmx.fun.NonEmptyList
- toString() - Method in class dmx.fun.NonEmptyMap
- toString() - Method in class dmx.fun.NonEmptySet
- toString() - Method in record class dmx.fun.Option.None
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Option.Some
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Result.Err
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Result.Ok
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Result.Partition
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Try.Failure
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Try.Success
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Tuple2
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Tuple3
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Tuple4
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Validated.Invalid
-
Returns a string representation of this record class.
- toString() - Method in record class dmx.fun.Validated.Valid
-
Returns a string representation of this record class.
- toTry() - Method in class dmx.fun.Lazy
- toTry(Function) - Method in interface dmx.fun.Result
-
Converts the current result into a
Tryinstance. - toTry(Function) - Method in interface dmx.fun.Validated
-
Converts this
Validatedto aTry. - toTry(Supplier) - Method in interface dmx.fun.Option
-
Converts the current instance to a
Tryinstance. - toTuple2() - Method in record class dmx.fun.Accumulator
-
Converts this accumulator to a
Tuple2of(accumulated, value). - toValidated() - Method in interface dmx.fun.Either
-
Converts this
Eitherto aValidated. - traverse(Iterable, Function) - Static method in interface dmx.fun.Option
-
Transforms a collection of values of type A into an optional list of values of type B by applying a given mapping function to each element in the input collection.
- traverse(Iterable, Function) - Static method in interface dmx.fun.Result
-
Maps each element of an iterable through
mapperand collects the results into aResult<List<B>, E>. - traverse(Iterable, Function) - Static method in interface dmx.fun.Try
-
Maps each element of an iterable through
mapperand collects the results into aTry<List<B>>. - traverse(Iterable, Function, BinaryOperator) - Static method in interface dmx.fun.Validated
-
Maps each element of an iterable through
mapperand collects the results into aValidated<E, List<B>>, accumulating all errors. - traverse(Stream, Function) - Static method in interface dmx.fun.Option
-
Transforms a stream of values by applying a mapper function that returns an
Optionfor each input value. - traverse(Stream, Function) - Static method in interface dmx.fun.Result
-
Maps each element of a stream through
mapperand collects the results into aResult<List<B>, E>. - traverse(Stream, Function) - Static method in interface dmx.fun.Try
-
Maps each element of a stream through
mapperand collects the results into aTry<List<B>>. - traverseCollector(Function, BinaryOperator) - Static method in interface dmx.fun.Validated
-
Returns a
Collectorthat maps each input element throughmapperand accumulates the results into a singleValidated<E, List<B>>, collecting all valid values and merging all errors left-to-right usingerrMerge. - traverseNel(Iterable, Function) - Static method in interface dmx.fun.Validated
-
Maps each element of
valuesthroughmapperand accumulates the results into aValidated<NonEmptyList<E>, List<B>>, accumulating all errors usingNonEmptyList.concat(NonEmptyList). - TriFunction<A,
B, - Interface in dmx.funC, R> -
A functional interface for a function that accepts three arguments and produces a result.
- Try<Value> - Interface in dmx.fun
-
A monadic type that represents a computation that may either result in a value (
Try.Success) or throw an exception (Try.Failure). - Try.Failure<Value> - Record Class in dmx.fun
-
Represents a computational failure within a context that implements the
Tryinterface. - Try.Success<Value> - Record Class in dmx.fun
-
Represents a successful computation result within the Try monad pattern.
- TryAssert<V> - Class in dmx.fun.assertj
-
AssertJ assertions for
Try. - Tuple2<A,
B> - Record Class in dmx.fun -
An immutable tuple holding two values of potentially different types.
- Tuple2(A, B) - Constructor for record class dmx.fun.Tuple2
-
Creates an instance of a
Tuple2record class. - Tuple2Assert<A,
B> - Class in dmx.fun.assertj -
AssertJ assertions for
Tuple2. - Tuple3<A,
B, - Record Class in dmx.funC> -
An immutable triple holding three values of potentially different types.
- Tuple3(A, B, C) - Constructor for record class dmx.fun.Tuple3
-
Validates that none of the elements are null.
- Tuple3Assert<A,
B, - Class in dmx.fun.assertjC> -
AssertJ assertions for
Tuple3. - Tuple4<A,
B, - Record Class in dmx.funC, D> -
An immutable quadruple holding four values of potentially different types.
- Tuple4(A, B, C, D) - Constructor for record class dmx.fun.Tuple4
-
Validates that none of the elements are null.
- Tuple4Assert<A,
B, - Class in dmx.fun.assertjC, D> -
AssertJ assertions for
Tuple4. - TxResult - Class in dmx.fun.spring
-
Spring component that executes a
Result-returning action inside a managed transaction, automatically rolling back when the result represents a failure. - TxResult(PlatformTransactionManager) - Constructor for class dmx.fun.spring.TxResult
-
Creates a
TxResultbacked by the given transaction manager. - TxTry - Class in dmx.fun.spring
-
Spring component that executes a
Try-returning action inside a managed transaction, automatically rolling back when the result represents a failure. - TxTry(PlatformTransactionManager) - Constructor for class dmx.fun.spring.TxTry
-
Creates a
TxTrybacked by the given transaction manager. - TxValidated - Class in dmx.fun.spring
-
Spring component that executes a
Validated-returning action inside a managed transaction, automatically rolling back when the result isValidated.isInvalid(). - TxValidated(PlatformTransactionManager) - Constructor for class dmx.fun.spring.TxValidated
-
Creates a
TxValidatedbacked by the given transaction manager. - Typical accumulation types - Section in record class dmx.fun.Accumulator
U
- union(NonEmptySet) - Method in class dmx.fun.NonEmptySet
-
Returns a new
NonEmptySetthat is the union of this set andother. - use(CheckedFunction) - Method in class dmx.fun.Resource
-
Acquires the resource, applies
bodyto it, releases the resource, and returns the body's result wrapped in aTry. - useAsResult(Function, Function) - Method in class dmx.fun.Resource
-
Acquires the resource, applies
bodyto produce aResult, releases the resource, and returns aResult<R, E>.
V
- valid(A) - Static method in interface dmx.fun.Validated
-
Creates a
Validated.Validinstance wrapping the given value. - Valid(A) - Constructor for record class dmx.fun.Validated.Valid
-
Compact canonical constructor — validates that
valueis non-null. - Validated<E,
A> - Interface in dmx.fun -
A sealed interface representing a validated value that can either be a successful value (
Validated.Valid) or an error (Validated.Invalid). - Validated.Invalid<E,
A> - Record Class in dmx.fun -
Represents an invalid result containing an error of type
E. - Validated.Valid<E,
A> - Record Class in dmx.fun -
Represents a valid result containing a value of type
A. - ValidatedAssert<E,
A> - Class in dmx.fun.assertj -
AssertJ assertions for
Validated. - value() - Method in record class dmx.fun.Accumulator
-
Returns the value of the
valuerecord component. - value() - Method in record class dmx.fun.Either.Left
-
Returns the value of the
valuerecord component. - value() - Method in record class dmx.fun.Either.Right
-
Returns the value of the
valuerecord component. - value() - Method in record class dmx.fun.Option.Some
-
Returns the value of the
valuerecord component. - value() - Method in record class dmx.fun.Result.Ok
-
Returns the value of the
valuerecord component. - value() - Method in record class dmx.fun.Try.Success
-
Returns the value of the
valuerecord component. - value() - Method in record class dmx.fun.Validated.Valid
-
Returns the value of the
valuerecord component. - values() - Method in class dmx.fun.NonEmptyMap
-
Returns a
NonEmptyListcontaining all values of this map in insertion order.
W
- withTimeout(Duration, CheckedSupplier) - Static method in interface dmx.fun.Try
-
Executes
supplieron a virtual thread and returns the result as aTry.
Z
- zip(Option, Option) - Static method in interface dmx.fun.Option
- zip(Option) - Method in interface dmx.fun.Option
-
Combines the current
Optioninstance with anotherOptioninstance into a singleOptioncontaining aTuple2of their values, if both options are non-empty. - zip(Result, Result) - Static method in interface dmx.fun.Result
- zip(Try, Try) - Static method in interface dmx.fun.Try
- zip3(Option, Option, Option) - Static method in interface dmx.fun.Option
- zip3(Option, Option) - Method in interface dmx.fun.Option
-
Combines this
Optionwith two others into anOption<Tuple3>. - zip3(Result, Result, Result) - Static method in interface dmx.fun.Result
- zip3(Try, Try, Try) - Static method in interface dmx.fun.Try
- zip4(Option, Option, Option, Option) - Static method in interface dmx.fun.Option
- zip4(Option, Option, Option) - Method in interface dmx.fun.Option
-
Combines this
Optionwith three others into anOption<Tuple4>. - zip4(Result, Result, Result, Result) - Static method in interface dmx.fun.Result
- zip4(Try, Try, Try, Try) - Static method in interface dmx.fun.Try
- zipWith(Option, BiFunction) - Method in interface dmx.fun.Option
-
Combines the values of this Option with the values of another Option using a provided combining function.
- zipWith(Function) - Method in interface dmx.fun.Option
-
Applies
mapperto the value inside thisOptionand pairs the original value with the result. - zipWith3(Option, Option, TriFunction) - Method in interface dmx.fun.Option
-
Combines this
Optionwith two others using aTriFunction. - zipWith3(Result, Result, Result, TriFunction) - Static method in interface dmx.fun.Result
-
Combines three
Resultvalues using aTriFunction. - zipWith3(Try, Try, Try, TriFunction) - Static method in interface dmx.fun.Try
-
Combines three
Tryvalues using aTriFunction. - zipWith4(Option, Option, Option, QuadFunction) - Method in interface dmx.fun.Option
-
Combines this
Optionwith three others using aQuadFunction. - zipWith4(Result, Result, Result, Result, QuadFunction) - Static method in interface dmx.fun.Result
-
Combines four
Resultvalues using aQuadFunction. - zipWith4(Try, Try, Try, Try, QuadFunction) - Static method in interface dmx.fun.Try
-
Combines four
Tryvalues using aQuadFunction.
_
- _1() - Method in record class dmx.fun.Tuple2
-
Returns the value of the
_1record component. - _1() - Method in record class dmx.fun.Tuple3
-
Returns the value of the
_1record component. - _1() - Method in record class dmx.fun.Tuple4
-
Returns the value of the
_1record component. - _2() - Method in record class dmx.fun.Tuple2
-
Returns the value of the
_2record component. - _2() - Method in record class dmx.fun.Tuple3
-
Returns the value of the
_2record component. - _2() - Method in record class dmx.fun.Tuple4
-
Returns the value of the
_2record component. - _3() - Method in record class dmx.fun.Tuple3
-
Returns the value of the
_3record component. - _3() - Method in record class dmx.fun.Tuple4
-
Returns the value of the
_3record component. - _4() - Method in record class dmx.fun.Tuple4
-
Returns the value of the
_4record component.
All Classes and Interfaces|All Packages|Serialized Form
Result.err(Object)with an explicit type witness or a typed variable instead:Result.<Value, Error>err(error)orResult<Value, Error> r = Result.err(error)