From 25dc6bc81c8dbc8e6d808d62025dc8bf77304d31 Mon Sep 17 00:00:00 2001 From: Abhinab Kanrar Date: Sun, 12 Feb 2017 13:41:25 +0530 Subject: [PATCH] Delete JoinerSplitter.java (#1161) --- .../baeldung/streamApi/JoinerSplitter.java | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 core-java/src/main/java/com/baeldung/streamApi/JoinerSplitter.java diff --git a/core-java/src/main/java/com/baeldung/streamApi/JoinerSplitter.java b/core-java/src/main/java/com/baeldung/streamApi/JoinerSplitter.java deleted file mode 100644 index 52ffc61799..0000000000 --- a/core-java/src/main/java/com/baeldung/streamApi/JoinerSplitter.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.baeldung.streamApi; - -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -public class JoinerSplitter { - - public static String join(String[] arrayOfString) { - return Arrays - .asList(arrayOfString) - .stream() - .map(x -> x) - .collect(Collectors.joining(",")); - } - - public static String joinWithPrefixPostFix(String[] arrayOfString) { - return Arrays - .asList(arrayOfString) - .stream() - .map(x -> x) - .collect(Collectors.joining(",", "[", "]")); - } - - public static List split(String str) { - return Stream - .of(str.split(",")) - .map(elem -> new String(elem)) - .collect(Collectors.toList()); - } - - public static List splitToListOfChar(String str) { - return str - .chars() - .mapToObj(item -> (char) item) - .collect(Collectors.toList()); - } - -}