All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.sdk.result.ResultElementFactory Maven / Gradle / Ivy

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.Nullable;

/**
 * Factory interface to encapsulating different ways to create a {@code ResultElement} from an arbitrary object.
 * 
 * @param 
 *            The type of the object to create the {@code ResultElement} from.
 */
public interface ResultElementFactory
{
    /**
     * Creates a {@code ResultElement} based on the given object.
     * 
     * @param resultElement
     *            The object to build the {@code ResultElement} from.
     * @return A {@code ResultElement} created from the given object.
     * @throws IllegalArgumentException
     *             If the given object could not be used to build a {@code ResultElement}.
     */
    @Nullable
    ResultElement create( @Nullable final ResultElementT resultElement )
        throws IllegalArgumentException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy