Class Selection.Parser

java.lang.Object
com.google.mu.collect.Selection.Parser
Enclosing interface:
Selection<T>

public static final class Selection.Parser extends Object
Parser for Selection.
Since:
4.7
  • Method Details

    • parse

      public <T, E extends Throwable> Selection<T> parse(String string, CheckedFunction<String,? extends T,E> elementParser) throws E
      Parses string into a Selection by treating the single '*' character as Selection.all(), and delegating to elementParser to parse each explicit selection element.

      Leading and trailing whitespaces are trimmed. Empty and duplicate elements are ignored.

      Throws:
      E
    • parse

      public Selection<String> parse(String string)
      Parses string into a Selection of strings by treating the single '*' character as Selection.all().

      Leading and trailing whitespaces are trimmed. Empty and duplicate elements are ignored.