aws-panorama-applicationinstance/src/main/java/software/amazon/panorama/applicationinstance/Translator.java [213:233]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private static <T> Stream<T> streamOfOrEmpty(final Collection<T> collection) {
    return Optional.ofNullable(collection)
            .map(Collection::stream)
            .orElseGet(Stream::empty);
  }

  static UntagResourceRequest translateToUntagResourceRequest(Set<Tag> tags, String arn) {
    return UntagResourceRequest
            .builder()
            .resourceArn(arn)
            .tagKeys(tags.stream().map(x -> x.getKey()).collect(Collectors.toList()))
            .build();
  }

  static TagResourceRequest translateToTagResourceRequest(Set<Tag> tags, String arn) {
    return TagResourceRequest
            .builder()
            .resourceArn(arn)
            .tags(tags.stream().collect( Collectors.toMap(Tag::getKey,
                    Tag::getValue)))
            .build();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-panorama-package/src/main/java/software/amazon/panorama/package_/Translator.java [128:148]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private static <T> Stream<T> streamOfOrEmpty(final Collection<T> collection) {
    return Optional.ofNullable(collection)
            .map(Collection::stream)
            .orElseGet(Stream::empty);
  }

  static UntagResourceRequest translateToUntagResourceRequest(Set<Tag> tags, String arn) {
    return UntagResourceRequest
            .builder()
            .resourceArn(arn)
            .tagKeys(tags.stream().map(x -> x.getKey()).collect(Collectors.toList()))
            .build();
  }

  static TagResourceRequest translateToTagResourceRequest(Set<Tag> tags, String arn) {
    return TagResourceRequest
            .builder()
            .resourceArn(arn)
            .tags(tags.stream().collect( Collectors.toMap(Tag::getKey,
                    Tag::getValue)))
            .build();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



