java.lang.Object
ushiosan.jvm.UAction
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Talso(T obj, @NotNull UEmptyFun.UEmptyFun1<T> action) Applies configuration to an object based on a local context.static <T,E extends Throwable>
TalsoErr(T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) Applies configuration to an object based on a local context.static <T,E extends Throwable>
TalsoErrNotNull(T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) Applies configuration to an object based on a local context.static <T,E extends Throwable>
TalsoErrSafe(T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) Applies configuration to an object based on a local context.static <T,E extends Throwable>
TalsoErrSafeNotNull(T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) Applies configuration to an object based on a local context.static <T> TalsoNotNull(T obj, @NotNull UEmptyFun.UEmptyFun1<T> action) Applies configuration to an object based on a local context.static <R,T> R apply(T obj, @NotNull UFun.UFun1<R, T> action) Applies configuration to an object based on a local context.static <R,T, E extends Throwable>
RapplyErr(T obj, @NotNull UFunErr.UFunErr1<R, T, E> action) Applies configuration to an object based on a local context.static <R,T, E extends Throwable>
RapplyErrNotNull(T obj, @NotNull UFunErr.UFunErr1<R, T, E> action) Applies configuration to an object based on a local context.applyErrSafe(T obj, @NotNull UFunErr.UFunErr1<R, T, E> action) Applies configuration to an object based on a local context.applyErrSafeNotNull(T obj, @NotNull UFunErr.UFunErr1<R, T, E> action) Applies configuration to an object based on a local context.static <R,T> R applyNotNull(T obj, @NotNull UFun.UFun1<R, T> action) Applies configuration to an object based on a local context.
-
Method Details
-
also
@Contract("_, _ -> param1") @Nullable public static <T> T also(@Nullable T obj, @NotNull UEmptyFun.UEmptyFun1<T> action) Applies configuration to an object based on a local context. Returns the same object but with the configuration already applied.- Type Parameters:
T- object type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- the same object but with the configuration already applied
- Throws:
IllegalArgumentException- error ifactionisnull
-
alsoNotNull
Applies configuration to an object based on a local context. Returns the same object but with the configuration already applied.- Type Parameters:
T- object type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- the same object but with the configuration already applied
- Throws:
IllegalArgumentException- error ifobjoractionisnull
-
alsoErr
@Nullable public static <T,E extends Throwable> T alsoErr(@Nullable T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) throws EApplies configuration to an object based on a local context. Returns the same object but with the configuration already applied.- Type Parameters:
T- object typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- the same object but with the configuration already applied
- Throws:
E- error if something goes wrongIllegalArgumentException- error ifactionisnull
-
alsoErrNotNull
@NotNull public static <T,E extends Throwable> T alsoErrNotNull(@NotNull T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) throws EApplies configuration to an object based on a local context. Returns the same object but with the configuration already applied.- Type Parameters:
T- object typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- the same object but with the configuration already applied
- Throws:
E- error if something goes wrongIllegalArgumentException- error ifobjoractionisnull
-
alsoErrSafe
@Nullable public static <T,E extends Throwable> T alsoErrSafe(@Nullable T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) Applies configuration to an object based on a local context. Returns the same object but with the configuration already applied.- Type Parameters:
T- object typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- the same object but with the configuration already applied
- Throws:
IllegalArgumentException- error ifactionisnull
-
alsoErrSafeNotNull
@NotNull public static <T,E extends Throwable> T alsoErrSafeNotNull(@NotNull T obj, @NotNull UEmptyFunErr.UEmptyFunErr1<T, E> action) Applies configuration to an object based on a local context. Returns the same object but with the configuration already applied.- Type Parameters:
T- object typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- the same object but with the configuration already applied
- Throws:
IllegalArgumentException- error ifobjoractionisnull
-
apply
Applies configuration to an object based on a local context. Returns a different object depending on the applied configuration.- Type Parameters:
T- object typeR- result type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- a different object depending on the applied configuration.
- Throws:
IllegalArgumentException- error ifactionisnull
-
applyNotNull
Applies configuration to an object based on a local context. Returns a different object depending on the applied configuration.- Type Parameters:
T- object typeR- result type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- a different object depending on the applied configuration.
- Throws:
IllegalArgumentException- error ifobjoractionisnull
-
applyErr
public static <R,T, R applyErrE extends Throwable> (@Nullable T obj, @NotNull UFunErr.UFunErr1<R, T, throws EE> action) Applies configuration to an object based on a local context. Returns a different object depending on the applied configuration.- Type Parameters:
T- object typeR- result typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- a different object depending on the applied configuration.
- Throws:
E- error if something goes wrongIllegalArgumentException- error ifactionisnull
-
applyErrNotNull
public static <R,T, R applyErrNotNullE extends Throwable> (@NotNull T obj, @NotNull UFunErr.UFunErr1<R, T, throws EE> action) Applies configuration to an object based on a local context. Returns a different object depending on the applied configuration.- Type Parameters:
T- object typeR- result typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- a different object depending on the applied configuration.
- Throws:
IllegalArgumentException- error ifobjoractionisnullE extends Throwable
-
applyErrSafe
@NotNull public static <R,T, @NotNull Optional<R> applyErrSafeE extends Throwable> (@Nullable T obj, @NotNull UFunErr.UFunErr1<R, T, E> action) Applies configuration to an object based on a local context. Returns a different object depending on the applied configuration.- Type Parameters:
T- object typeR- result typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- a different object depending on the applied configuration.
-
applyErrSafeNotNull
@NotNull public static <R,T, @NotNull Optional<R> applyErrSafeNotNullE extends Throwable> (@NotNull T obj, @NotNull UFunErr.UFunErr1<R, T, E> action) Applies configuration to an object based on a local context. Returns a different object depending on the applied configuration.- Type Parameters:
T- object typeR- result typeE- error type- Parameters:
obj- the base object to configureaction- the action to execute- Returns:
- a different object depending on the applied configuration.
-