@SuppressWarnings({ "unchecked", "checkstyle:illegaltype" })
	Collection<V> copyValues(Collection<V> values) {
		final Object backEnd = DataViewDelegate.undelegate(values);
		if (backEnd instanceof List<?>) {
			return Lists.newArrayList(values);
		}
		if (backEnd instanceof TreeSet<?>) {
			TreeSet<V> c = (TreeSet<V>) backEnd;
			c = Sets.newTreeSet(c.comparator());
			c.addAll(values);
			return c;
		}
		if (backEnd instanceof LinkedHashSet<?>) {
			return Sets.newLinkedHashSet(values);
		}
		if (backEnd instanceof Set<?>) {
			return Sets.newHashSet(values);
		}
		throw new IllegalStateException("Unsupported type of the backend multimap: " + values.getClass()); //$NON-NLS-1$
	}
@ SuppressWarnings ( { "unchecked" , "checkstyle:illegaltype" } ) Collection < V > copyValues ( Collection < V > values ) { final Object backEnd = DataViewDelegate . undelegate ( values ) ; if ( backEnd instanceof List < ? > ) { return Lists . newArrayList ( values ) ; } if ( backEnd instanceof TreeSet < ? > ) { TreeSet < V > c = ( TreeSet < V > ) backEnd ; c = Sets . newTreeSet ( c . comparator ( ) ) ; c . addAll ( values ) ; return c ; } if ( backEnd instanceof LinkedHashSet < ? > ) { return Sets . newLinkedHashSet ( values ) ; } if ( backEnd instanceof Set < ? > ) { return Sets . newHashSet ( values ) ; } throw new IllegalStateException ( "Unsupported type of the backend multimap: " + values . getClass ( ) ) ; }
Copy the given values.

<p>The replies collection may be a {@link List} or a {@link Set} according to the type of the given values' collection.

@param values the values.
@return the copy.