primary
Returns an optional containing the value of type
Either, if it exists.- Returns:
- the first value
U - primary value typeV - fallback value typefallback()Either, if it exists.fallbackOrMapPrimary(@NonNull Function<U,V> mapPrimary) default <R> @NonNull Rprimary() or fallback(), in that order, applying the appropriate function
to map the result to R.ofFallback(@NonNull V value) value of the fallback type Either.value of the primary type Either.primary()Either, if it exists.primaryOrMapFallback(@NonNull Function<V,U> mapFallback) value of the primary type Either.U - primary value typeV - secondary value typevalue - primary valuevalue of the fallback type Either.U - primary value typeV - secondary value typevalue - primary valueEither, if it exists.Either, if it exists.mapFallback - function mapping the fallback type to UmapPrimary - function mapping the primary type to Vprimary() or fallback(), in that order, applying the appropriate function
to map the result to R.R - mapped typemapPrimary - function mapping the primary type to RmapFallback - function mapping the fallback type to R