MCPcopy Create free account
hub / github.com/antlr/codebuff / copyOf

Method copyOf

output/java_guava/1.4.18/ImmutableSortedSet.java:173–175  ·  view source on GitHub ↗

Returns an immutable sorted set containing the given elements sorted by their natural ordering. When multiple elements are equivalent according to Comparable#compareTo, only the first one specified is included. @throws NullPointerException if any of elements is null @since 3.0

(E[] elements)

Source from the content-addressed store, hash-verified

171
172
173 public static <E extends Comparable<? super E>> ImmutableSortedSet<E> copyOf(E[] elements) {
174 return construct(Ordering.natural(), elements.length, elements.clone());
175 }
176
177 /**
178 * Returns an immutable sorted set containing the given elements sorted by

Callers 2

toSortedSetMethod · 0.95
valueSetMethod · 0.95

Calls 9

constructMethod · 0.95
naturalMethod · 0.95
hasSameComparatorMethod · 0.95
toArrayMethod · 0.95
addAllMethod · 0.65
cloneMethod · 0.45
buildMethod · 0.45
checkNotNullMethod · 0.45
isPartialViewMethod · 0.45

Tested by

no test coverage detected