@Test public void testSupportedPipeCharWithoutRegex() { String[] expectedTextTokenValue = new String[]{"thread", "|", "grep", "xxx"}; List<CliToken> actualTokens = CliTokenImpl.tokenize("thread| grep xxx"); assertEquals(expectedTextTokenValue, actualTokens); actualTokens = CliTokenImpl.tokenize("thread | grep xxx"); assertEquals(expectedTextTokenValue, actualTokens); actualTokens = CliTokenImpl.tokenize("thread |grep xxx"); assertEquals(expectedTextTokenValue, actualTokens); }
public static List<CliToken> tokenize(String s) { List<CliToken> tokens = new LinkedList<CliToken>(); tokenize(s, 0, tokens); tokens = correctPipeChar(tokens); return tokens; }
CliTokenImpl implements CliToken { public static List<CliToken> tokenize(String s) { List<CliToken> tokens = new LinkedList<CliToken>(); tokenize(s, 0, tokens); tokens = correctPipeChar(tokens); return tokens; } }
CliTokenImpl implements CliToken { public static List<CliToken> tokenize(String s) { List<CliToken> tokens = new LinkedList<CliToken>(); tokenize(s, 0, tokens); tokens = correctPipeChar(tokens); return tokens; } CliTokenImpl(boolean text, String value);  CliTokenImpl(boolean text, String raw, String value); }
CliTokenImpl implements CliToken { public static List<CliToken> tokenize(String s) { List<CliToken> tokens = new LinkedList<CliToken>(); tokenize(s, 0, tokens); tokens = correctPipeChar(tokens); return tokens; } CliTokenImpl(boolean text, String value);  CliTokenImpl(boolean text, String raw, String value); @Override boolean isText(); @Override boolean isBlank(); String raw(); String value(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static List<CliToken> tokenize(String s); }
CliTokenImpl implements CliToken { public static List<CliToken> tokenize(String s) { List<CliToken> tokens = new LinkedList<CliToken>(); tokenize(s, 0, tokens); tokens = correctPipeChar(tokens); return tokens; } CliTokenImpl(boolean text, String value);  CliTokenImpl(boolean text, String raw, String value); @Override boolean isText(); @Override boolean isBlank(); String raw(); String value(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static List<CliToken> tokenize(String s);  }