Map by map.

@param <T>        the type parameter
@param <R>        the type parameter
@param stream     the stream
@param classifier the classifier
@return the map
435846
public static <T, R> Map<R, T> mapBy(Stream<T> stream,
            Function<T, R> classifier) {
        return stream
                .collect(toMap(classifier, identity(), (o, o2) -> o2));
    }
1002662
public static <K, V> Stream<Entry<K, V>> buildEntryStream(Map<K, V> map) {
        return map.entrySet().stream();
    }
922651
public <T> T read(final InputStream stream, final DataTypeDescriptor<T> descriptor)
			throws Exception {
		if (stream == null) throw new NullPointerException("input");
		if (descriptor == null) throw new NullPointerException("descriptor");

		JsonParser parser = factory.createParser(stream);
		return read(parser, descriptor);
	}
504164
public final static <T, R> Stream<R> flatMapStream(final Stream<T> stream, final Function<? super T, ? extends BaseStream<? extends R, ?>> fn) {
        return stream.flatMap(fn.andThen(bs -> {

            if (bs instanceof Stream)
                return (Stream<R>) bs;
            else
                return Streams.stream(bs.iterator());

        }));
    }
738225
public void setTypeMap(Map<Class<? extends T>, C> map) {
		this.classified = new ConcurrentHashMap<Class<? extends T>, C>(map);
	}
1065696
public static void classifiesElements(Map<ShapeElementType, MapElementGroup> classification,
			Iterator<? extends MapElement> elements) {
		ShapeElementType type;
		MapElementGroup group;
		MapElement element;
		while (elements.hasNext()) {
			element = elements.next();
			type = classifiesElement(element);
			if (type != ShapeElementType.UNSUPPORTED) {
				group = classification.get(type);
				if (group == null) {
					group = new MapElementGroup();
					classification.put(type, group);
				}
				group.add(element);
			}
		}
	}
1191610
public static Map makeMap(Mapper mapper, Iterator i) {
        return makeMap(mapper, i, false);
    }
475967
public static <T> Stream<T> stream(final Iterable<T> source) {
        return new Stream<T>() {
            @Override
            public Iterator<T> iterator() {
                return source.iterator();
            }
        };
    }
1108040
public static <K, V> Map<K, V> toSortedMap(Map<K, V> map, Comparator<? super K> comparator) {
        Map<K, V> sortedMap;
        if (comparator == null)
            sortedMap = new LinkedHashMap<>();
        else
            sortedMap = new TreeMap<>(comparator);
        sortedMap.putAll(map);
        return sortedMap;
    }
903469
public final static <R,T> R foldLeftMapToType(final Stream<T> stream, final Reducer<R,T> reducer) {
        return reducer.foldMap(stream);
    }
1097179
public <R> Stream<R> map(Function<? super T, ? extends R> mapper) {
        List<R> list = new ArrayList<R>();
        while (iterator.hasNext()) {
            list.add(mapper.apply(iterator.next()));
        }
        return Stream.of(list);
    }
320281
public static <T, U> Stream<U> cast(final Stream<T> stream, final Class<? extends U> type) {
        return stream.map(type::cast);
    }
15514
public static Map makeMap(Mapper mapper, Object[] a) {
        return makeMap(mapper, java.util.Arrays.asList(a), false);
    }
1190661
public static <T, R> Iterable<R> map(final Iterable<T> iterable, final IFunction<T, R> mapper) {
        return new Iterable<R>() {
            @Override
            public Iterator<R> iterator() {
                return map(iterable.iterator(), mapper);
            }
        };
    }
909658
public static <K, V> EntryStream<K, V> of(Map<K, V> map) {
        return of(map.entrySet().stream());
    }
399740
public <T> void addMapper(Class<T> clazz, StringMapper<T> mapper) {
		addParser(clazz, mapper);
		mappers.put(clazz, mapper);
	}
170856
public <T, R> Stream<R> map(Stream<T> stream, Function<? super T, ? extends R> mapper) {
        Callable<Stream<R>> callable = () -> stream.map(mapper);
        return ThreadMethods.forkJoinExecution(callable, concurrencyConfiguration, stream.isParallel());
    }