Code example for SortedSet

Methods: comparator

0
		} 
		else if (collection instanceof List) {
			return new ArrayList(initialCapacity);
		} 
		else if (collection instanceof SortedSet) {
			return new TreeSet(((SortedSet) collection).comparator());
		} 
		else { 
			return new LinkedHashSet(initialCapacity);
		} 
	} 
 
	/** 
	 * Determine whether the given map type is an approximable type, 
	 * i.e. a type that {@link #createApproximateMap} can approximate. 
	 * @param mapType the map type to check 
	 * @return <code>true</code> if the type is approximable, 
	 * <code>false</code> if it is not 
	 */ 
	public static boolean isApproximableMapType(Class<?> mapType) {
		return (mapType != null && approximableMapTypes.contains(mapType));