當前位置: 首頁>>代碼示例>>Java>>正文


Java Function.compose方法代碼示例

本文整理匯總了Java中java.util.function.Function.compose方法的典型用法代碼示例。如果您正苦於以下問題:Java Function.compose方法的具體用法?Java Function.compose怎麽用?Java Function.compose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.util.function.Function的用法示例。


在下文中一共展示了Function.compose方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getOutboundResponseFromUnknownUserCreationServiceToElementTransformer

import java.util.function.Function; //導入方法依賴的package包/類
public Function<OutboundResponseFromUnknownUserCreationService, Element> getOutboundResponseFromUnknownUserCreationServiceToElementTransformer(
        final EncryptionKeyStore encryptionKeyStore,
        final IdaKeyStore keyStore,
        final EntityToEncryptForLocator entityToEncryptForLocator,
        MatchingServiceAdapterConfiguration configuration) {
    Function<OutboundResponseFromUnknownUserCreationService, Response> t1 =
            new OutboundResponseFromUnknownUserCreationServiceToSamlResponseTransformer(
                    new OpenSamlXmlObjectFactory(),
                    new UnknownUserCreationIdaStatusMarshaller(new OpenSamlXmlObjectFactory()),
                    createMatchingServiceAssertionToAssertionTransformer()
            );
    Function<Response, Element> t2 = getResponseToElementTransformer(
            encryptionKeyStore,
            keyStore,
            entityToEncryptForLocator,
            configuration);
    return t2.compose(t1);
}
 
開發者ID:alphagov,項目名稱:verify-matching-service-adapter,代碼行數:19,代碼來源:MsaTransformersFactory.java

示例2: getOutboundResponseFromMatchingServiceToElementTransformer

import java.util.function.Function; //導入方法依賴的package包/類
public Function<OutboundResponseFromMatchingService, Element> getOutboundResponseFromMatchingServiceToElementTransformer(
        final EncryptionKeyStore encryptionKeyStore,
        final IdaKeyStore keyStore,
        final EntityToEncryptForLocator entityToEncryptForLocator,
        MatchingServiceAdapterConfiguration configuration) {
    Function<OutboundResponseFromMatchingService, Response> t1 = new OutboundResponseFromMatchingServiceToSamlResponseTransformer(
            new MatchingServiceIdaStatusMarshaller(new OpenSamlXmlObjectFactory()),
            new OpenSamlXmlObjectFactory(),
            createMatchingServiceAssertionToAssertionTransformer()
    );
    Function<Response, Element> t2 = getResponseToElementTransformer(
            encryptionKeyStore,
            keyStore,
        entityToEncryptForLocator,
        configuration);
    return t2.compose(t1);
}
 
開發者ID:alphagov,項目名稱:verify-matching-service-adapter,代碼行數:18,代碼來源:MsaTransformersFactory.java

示例3: of

import java.util.function.Function; //導入方法依賴的package包/類
/**
 * 3r approach
 */
public static <T,R> Function<T,R> of(Function<T,R> inner, String msg) {
    return inner.compose(arg -> {
        out.println(msg);
        return arg;
    });
}
 
開發者ID:isel-leic-mpd,項目名稱:mpd-2017-i41d,代碼行數:10,代碼來源:Loggify.java

示例4: getHealthcheckResponseFromMatchingServiceToElementTransformer

import java.util.function.Function; //導入方法依賴的package包/類
public Function<HealthCheckResponseFromMatchingService, Element> getHealthcheckResponseFromMatchingServiceToElementTransformer(
        final EncryptionKeyStore encryptionKeyStore,
        final IdaKeyStore keyStore,
        final EntityToEncryptForLocator entityToEncryptForLocator,
        MatchingServiceAdapterConfiguration configuration
){
    Function<HealthCheckResponseFromMatchingService, Response> t1 = getHealthCheckResponseFromMatchingServiceToResponseTransformer();
    Function<Response, Element> t2 = getResponseToElementTransformer(
            encryptionKeyStore,
            keyStore,
            entityToEncryptForLocator,
            configuration);
    return t2.compose(t1);
}
 
開發者ID:alphagov,項目名稱:verify-matching-service-adapter,代碼行數:15,代碼來源:MsaTransformersFactory.java

示例5: getMatchingServiceAssertionToStringTransformer

import java.util.function.Function; //導入方法依賴的package包/類
public Function<MatchingServiceAssertion, String> getMatchingServiceAssertionToStringTransformer() {
    Function<MatchingServiceAssertion, Assertion> matchingServiceAssertionToAssertionTransformer = createMatchingServiceAssertionToAssertionTransformer();
    Function<Assertion, String> assertionToStringTransformer = new XmlObjectToBase64EncodedStringTransformer<>();
    return assertionToStringTransformer.compose(matchingServiceAssertionToAssertionTransformer);
}
 
開發者ID:alphagov,項目名稱:verify-matching-service-adapter,代碼行數:6,代碼來源:MsaTransformersFactory.java


注:本文中的java.util.function.Function.compose方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。