Creates a new {@link Links} instance with all given {@link Link}s added. For conditional adding see
{@link #merge(Iterable)}.

@param links must not be {@literal null}.
@return
@see #merge(Iterable)
@see #merge(MergeMode, Iterable)
437342
public Links and(Iterable<Link> links) {

		List<Link> newLinks = new ArrayList<>(this.links);
		links.forEach(newLinks::add);

		return Links.of(newLinks);
	}
370632
public static List<EventData> merge(List<EventData> eventDatas) {
        Map<RowKey, EventData> result = new LinkedHashMap<RowKey, EventData>();
        for (EventData eventData : eventDatas) {
            merge(eventData, result);
        }
        return new LinkedList<EventData>(result.values());
    }
1322211
public void setLinks(Collection<Link> links) {
        Collection<com.ibm.ws.repository.transport.model.Link> attachmentLinks = new ArrayList<com.ibm.ws.repository.transport.model.Link>();
        for (Link link : links) {
            attachmentLinks.add(link.getLink());
        }

        _asset.getWlpInformation().setLinks(attachmentLinks);
    }
1060833
@JsonIgnore
	public List<Link> getLinks() {

		String url = this.url;

		if (url == null) {
			return Links.NONE.toList();
		}

		return Optional.ofNullable(this.rel) //
				.map(rels -> rels.stream() //
						.map(rel -> new Link(url, rel)) //
						.collect(Collectors.toList())) //
				.orElse(Collections.emptyList());
	}
999724
public static <T> Iterable<T> concat(final Iterable<? extends Iterable<? extends T>> iterables) {
        return () -> Iterators.concat(iterators(iterables));
    }
252165
public static <T> Iterator<T> join(Collection<Iterable<T>> iterables) {
        Queue<Iterator<T>> iters = 
            new ArrayDeque<Iterator<T>>(iterables.size());
        for (Iterable<T> i : iterables)
            iters.add(i.iterator());
        return new CombinedIterator<T>(iters);
    }
229828
public static <K, V> Map<K, V> merge(Map<K, V>... maps) {
        Map<K, V> map = null;
        for (Map<K, V> m : maps) {
            if (map == null) {
                map = m;
            } else if (m != null) {
                map.putAll(m);
            }
        }
        return map;
    }
557138
@Nonnull
    public final LinkedList<A> toLinkedList() {
        LinkedList<A> list = new LinkedList<>();
        ImmutableList<A> l = this;
        for (int i = 0; i < length; i++) {
            list.add(((NonEmptyImmutableList<A>) l).head);
            l = ((NonEmptyImmutableList<A>) l).tail;
        }
        return list;
    }
1124460
public Collection<Link> links(LinkFilter filter) {
        return get(Link.class, (filter != null) ? filter : new LinkFilter());
    }
598365
static Map<String, Object> merge(Map<String, Object>... args) {
        if (args.length > 1) {
            Map<String, Object> obj = args[0];
            for (int i = 1; i < args.length; i++) {
                obj = mergeTwo(obj, args[i]);
            }
            return obj;
        } else if (args.length == 1) {
            return args[0];
        } else {
            return null;
        }
    }
622058
public static <T> LinkedList<T> newLinkedList(Iterable<? extends T> elements) {
		return Lists.newLinkedList(elements);
	}
954545
public HtmlPolicyBuilder requireRelsOnLinks(String... linkValues) {
    this.invalidateCompiledState();
    if (this.extraRelsForLinks == null) {
      this.extraRelsForLinks = Sets.newLinkedHashSet();
    }
    for (String linkValue : linkValues) {
      linkValue = HtmlLexer.canonicalName(linkValue);
      Preconditions.checkArgument(
          !Strings.containsHtmlSpace(linkValue),
          "spaces in input.  use f(\"foo\", \"bar\") not f(\"foo bar\")");
      this.extraRelsForLinks.add(linkValue);
    }
    if (this.skipRelsForLinks != null) {
      this.skipRelsForLinks.removeAll(this.extraRelsForLinks);
    }
    return this;
  }
579361
public HalFormsDocument<T> andLink(Link link) {

		Assert.notNull(link, "Link must not be null!");

		return new HalFormsDocument<>(resource, resources, embedded, pageMetadata, links.and(link), templates);
	}
1231357
private static List<UberData> mergeDeclaredLinksIntoAffordanceLinks(List<UberData> affordanceBasedLinks,
			List<UberData> links) {

		return affordanceBasedLinks.stream() //
				.flatMap(affordance -> links.stream() //
						.filter(link -> link.getUrl().equals(affordance.getUrl())) //
						.map(link -> {

							if (link.getAction() == affordance.getAction()) {

								List<LinkRelation> rels = new ArrayList<>(link.getRel());
								rels.addAll(affordance.getRel());

								return affordance.withName(rels.get(0).value()) //
										.withRel(rels);
							} else {
								return affordance;
							}
						}))
				.collect(Collectors.toList());
	}
358735
protected HalRepresentation add(final Links links) {
        this.links = this.links != null
                ? copyOf(this.links).with(links).build()
                : links.using(this.curies);
        if (embedded != null) {
            embedded = embedded.using(this.curies);
        }
        return this;
    }
522568
def normalize_links
      stack = @links.dup

      @links.clear

      while link = stack.pop
        relationship = case link
          when Symbol, String
            @relationships[link]
          else
            link
        end

        if relationship.respond_to?(:links)
          stack.concat(relationship.links)
        elsif !@links.include?(relationship)
          @links << relationship
        end
      end

      @links.reverse!
    end
625916
@Pure
	public static <K, V> LinkedHashMap<K, V> newLinkedHashMap() {
		return new LinkedHashMap<K, V>();
	}