
com.sap.cloud.sdk.result.ObjectExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-result Show documentation
Show all versions of fluent-result Show documentation
Fluent API for handling result structures.
The newest version!
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.result;
import javax.annotation.Nonnull;
/**
* Functional interface handling the type-safe transformation of a {@code ResultElement} to a specific type.
*
* @param
* The type of the value to extract.
*/
public interface ObjectExtractor
{
/**
* Extracts the value of the given {@code ResultElement} as the type {@code T}.
*
* @param resultElement
* The {@code ResultElement} to transform.
*
* @return The {@code resultElement} as the given type.
*
* @throws UnsupportedOperationException
* If the value could not be converted to the given type.
*/
@Nonnull
T extract( @Nonnull final ResultElement resultElement )
throws UnsupportedOperationException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy