org.n52.janmayen.function.Functions.mutate()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中org.n52.janmayen.function.Functions.mutate()方法的一些代码示例,展示了Functions.mutate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Functions.mutate()方法的具体详情如下:
包路径:org.n52.janmayen.function.Functions
类名称:Functions
方法名:mutate

Functions.mutate介绍

[英]Wrapps a Consumer into a Function that returns it's input argument.
[中]将使用者包装到一个函数中,该函数返回其输入参数。

代码示例

代码示例来源:origin: org.n52.sensorweb.sos/aqd-v10

private void modifyOperationsMetadata(OwsOperationsMetadata operationsMetadata) {
  modifyCommonParameters(operationsMetadata.getParameters());
  SortedSet<OwsOperation> operations = operationsMetadata.getOperations();
  operationsMetadata.setOperations(Stream.concat(
      operations.stream().filter(this::isGetCapabilities).map(mutate(this::setAcceptVersionsParameter)),
      operations.stream().filter(this::isGetObservation).map(mutate(this::setResponseFormat))
  )
      .map(mutate(this::removeJSONEndpoint)).map(mutate(this::addFlowParameter)).collect(toList()));
}

代码示例来源:origin: 52North/SOS

private void modifyOperationsMetadata(OwsOperationsMetadata operationsMetadata) {
  modifyCommonParameters(operationsMetadata.getParameters());
  SortedSet<OwsOperation> operations = operationsMetadata.getOperations();
  operationsMetadata.setOperations(Stream.concat(
      operations.stream().filter(this::isGetCapabilities).map(mutate(this::setAcceptVersionsParameter)),
      operations.stream().filter(this::isGetObservation).map(mutate(this::setResponseFormat))
  )
      .map(mutate(this::removeJSONEndpoint)).map(mutate(this::addFlowParameter)).collect(toList()));
}

代码示例来源:origin: 52North/SOS

private Stream<SosObservationOfferingExtension> offeringExtensionStream() {
  return createEntryStream(getConfiguration().with(JsonConstants.OFFERING_EXTENSIONS)).flatMap(entry
      -> createEntryStream(entry.getValue())
          .map(this::decodeOfferingExtension)
          .map(Functions.mutate(Consumers
              .currySecond(SosObservationOfferingExtensionImpl::setOfferingName, entry.getKey()))));
}

代码示例来源:origin: 52North/SOS

.map(Functions.mutate(this::checkAndChangeFeatureOfInterestIdentifier))
.collect(toMap(AbstractFeature::getIdentifier, Function.identity())));
.map(Functions.mutate(this::checkAndChangeObservablePropertyIdentifier))
.collect(toMap(AbstractPhenomenon::getIdentifier, identity())));

代码示例来源:origin: org.n52.sensorweb.sos/abstract-identifier

.map(Functions.mutate(this::checkAndChangeFeatureOfInterestIdentifier))
.collect(toMap(AbstractFeature::getIdentifier, Function.identity())));
.map(Functions.mutate(this::checkAndChangeObservablePropertyIdentifier))
.collect(toMap(AbstractPhenomenon::getIdentifier, identity())));

相关文章

微信公众号

最新文章

更多