code: public static <T> Map<Boolean, List<T>> toMapPartition( Stream<T> stream, Predicate<T> predicate ) {
          return stream.collect(Collectors.partitioningBy(predicate));
      }
docs: Split a stream into a map with true and false.
  
  @param stream the stream to collect.
  @param predicate the predicate to use to define true or false, ex. e->e.getValue().equals("test")
  @return the map of lists.