com.hazelcast.buildutils
Class ElementParser

java.lang.Object
  extended by com.hazelcast.buildutils.ElementParser

public final class ElementParser
extends Object

Originally taken from JBOSS project (thanks guys, great work) Original class: org.jboss.osgi.metadata.spi.ElementParser -> JBossOSGi Resolver Metadata

Author:
Thomas.Diesler@jboss.com

Method Summary
static List<String> parseDelimitedString(String value, char delim)
           
static List<String> parseDelimitedString(String value, char delim, boolean trim)
          Parses delimited string and returns an array containing the tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseDelimitedString

public static List<String> parseDelimitedString(String value,
                                                char delim)

parseDelimitedString

public static List<String> parseDelimitedString(String value,
                                                char delim,
                                                boolean trim)
Parses delimited string and returns an array containing the tokens. This parser obeys quotes, so the delimiter character will be ignored if it is inside of a quote. This method assumes that the quote character is not included in the set of delimiter characters.

Parameters:
value - the delimited string to parse.
delim - the characters delimiting the tokens.
trim - whether to trim the parts.
Returns:
an array of string tokens or null if there were no tokens.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.