Best code examples for Java 8 StringTokenizer class (java.util.StringTokenizer)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 StringTokenizer class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 StringTokenizer examples from Open Source projects
This code example shows how to use the following methods: countTokens, nextToken
72:	StringTokenizer tokenizer = new StringTokenizer(value, INCREMENT_SEPARATOR); 
73:	int numberOfTokens = tokenizer.countTokens(); 
-
78:	this.start = tokenizer.nextToken().trim(); 
79:	this.interval = tokenizer.nextToken().trim(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: hasMoreElements, nextToken
232:	StringTokenizer tokens = new StringTokenizer(code, "__"); 
233:	if (tokens.hasMoreElements()) { 
234:	language = tokens.nextToken(); 
-
236:	if (tokens.hasMoreElements()) { 
237:	country = tokens.nextToken(); 
-
239:	if (tokens.hasMoreElements()) { 
240:	variant = tokens.nextToken(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
50:	StringTokenizer st2 = new StringTokenizer("abcd efg", "abc", true); 
51:	st2.hasMoreTokens(); 
52:	checkValue("a", st2.nextToken("bc")); 
53:	st2.hasMoreTokens(); 
54:	checkValue("b", st2.nextToken()); 
55:	st2.hasMoreTokens(); 
56:	checkValue("cd", st2.nextToken(" ef")); 
57:	st2.hasMoreTokens(); 
58:	checkValue(" ", st2.nextToken(" ")); 
59:	st2.hasMoreTokens(); 
60:	checkValue("ef", st2.nextToken("g")); 
61:	st2.hasMoreTokens(); 
62:	checkValue("g", st2.nextToken("g")); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
38:	StringTokenizer token=new StringTokenizer(street, ","); 
-
42:	if(token.countTokens()==2){ 
43:	String temp=token.nextToken(); 
-
50:	temp=token.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
28:	StringTokenizer stringtokenizer = new StringTokenizer(s, "="); 
29:	if (stringtokenizer.countTokens() != 2) { 
-
33:	stringtokenizer.nextToken(); 
34:	String s1 = stringtokenizer.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
49:	StringTokenizer st = new StringTokenizer(value.toString(), "\t"); 
-
52:	entry.put("number", st.nextToken()); 
53:	entry.put("name", st.nextToken()); 
54:	entry.put("url", st.nextToken()); 
55:	if (st.hasMoreTokens()) { 
56:	entry.put("picture", st.nextToken()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: nextToken
528:	StringTokenizer st = new StringTokenizer(valueString); 
529:	float x = Float.parseFloat(st.nextToken()); 
530:	float y = Float.parseFloat(st.nextToken()); 
531:	float z = Float.parseFloat(st.nextToken()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreElements, hasMoreTokens, nextToken
80:	final StringTokenizer strtok = new StringTokenizer(s.trim(), "_"); 
81:	if (strtok.hasMoreElements() == false) 
-
85:	final String language = strtok.nextToken(); 
-
87:	if (strtok.hasMoreTokens()) 
-
89:	country = strtok.nextToken(); 
-
92:	if (strtok.hasMoreTokens()) 
-
94:	variant = strtok.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
128:	tokens = new StringTokenizer(line, " \t\n\r\f%"); 
-
130:	Long.parseLong(tokens.nextToken()); // skip capacity 
131:	Long.parseLong(tokens.nextToken()); // skip used 
132:	Long.parseLong(tokens.nextToken()); // skip available 
133:	Integer.parseInt(tokens.nextToken()); // skip percentUsed 
134:	this.mount = tokens.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
216:	StringTokenizer st = new StringTokenizer(ls, "_-,"); 
217:	if (st.hasMoreTokens()) { 
218:	lang = st.nextToken(); 
219:	if (st.hasMoreTokens()) { 
220:	country = st.nextToken(); 
221:	if (st.hasMoreTokens()) { 
222:	variant = st.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
27:	StringTokenizer st = new StringTokenizer(cmd); 
28:	st.nextToken(); 
-
32:	if (st.hasMoreTokens()) { 
33:	key = st.nextToken(); 
-
35:	if (st.hasMoreTokens()) { 
36:	expiration = Integer.parseInt(st.nextToken()); 
-
38:	if (st.hasMoreTokens()) { 
39:	noReply = "noreply".equals(st.nextToken()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
76:	StringTokenizer st = new StringTokenizer(params, ","); 
77:	if (st.hasMoreTokens()) 
78:	language = st.nextToken(); 
79:	if (st.hasMoreTokens()) 
80:	country = st.nextToken(); 
81:	if (st.hasMoreTokens()) 
82:	variant = st.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: nextToken
41:	StringTokenizer str = new StringTokenizer(field, ","); 
42:	p = new NativeBigInteger(1, HexUtil.hexToBytes(str.nextToken())); 
43:	g = new NativeBigInteger(1, HexUtil.hexToBytes(str.nextToken())); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
254:	if (op.hasMoreTokens()) { 
255:	String assign = op.nextToken(); 
-
257:	if (op.hasMoreTokens()) 
258:	return op.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
110:	StringTokenizer st = new StringTokenizer(response,":"); 
111:	if(st.countTokens() < 3){ 
-
117:	st.nextToken(); //Discard first token, it's basically what we have send 
118:	String command = st.nextToken().trim().toUpperCase(); 
-
120:	if(command.equals("USERID") && st.countTokens() >= 2){ 
-
122:	hostType = st.nextToken().trim(); 
123:	userName = st.nextToken("").substring(1);//Get all that is left 
-
126:	errorMessage = st.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: nextToken
89:	StringTokenizer addressTokens = new StringTokenizer(address, "."); 
90:	int bytes = Integer.parseInt(addressTokens.nextToken()) << 24 | Integer.parseInt(addressTokens.nextToken()) << 16 | Integer.parseInt(addressTokens.nextToken()) << 8 | Integer.parseInt(addressTokens.nextToken()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
139:	StringTokenizer st = new StringTokenizer(value); 
140:	if (!st.hasMoreTokens()) fail("Expecting libname"); 
141:	String libname = st.nextToken(); 
142:	if (!st.hasMoreTokens()) fail("Expecting 'as <alias>' in autoimport"); 
143:	String as = st.nextToken(); 
-
145:	if (!st.hasMoreTokens()) fail("Expecting alias after 'as' in autoimport"); 
146:	String alias = st.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
13:	StringTokenizer stringtokenizer = new StringTokenizer(str, set); 
14:	if(stringtokenizer.hasMoreTokens()) { 
15:	String rtn = stringtokenizer.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
80:	StringTokenizer tokens = new StringTokenizer(value.trim()); 
81:	if (tokens.hasMoreTokens()) { 
82:	String currentToken = tokens.nextToken(); 
-
86:	String ioType = tokens.nextToken(); 
-
88:	_portProfile.inputPolicyMap = tokens.nextToken(); 
-
90:	_portProfile.outputPolicyMap = tokens.nextToken(); 
-
97:	if (tokens.hasMoreTokens()) { 
98:	String firstToken = tokens.nextToken(); 
-
100:	setPortMode(tokens.nextToken()); 
-
102:	if (tokens.hasMoreTokens()) { 
103:	String secondToken = tokens.nextToken(); 
-
105:	if (tokens.hasMoreTokens()) { 
106:	_portProfile.vlan = tokens.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
278:	StringTokenizer st = new StringTokenizer(version, _SEPARATOR); 
-
280:	_major = st.nextToken(); 
-
282:	if (st.hasMoreTokens()) { 
283:	_minor = st.nextToken(); 
-
286:	if (st.hasMoreTokens()) { 
287:	_bugFix = st.nextToken(); 
-
290:	if (st.hasMoreTokens()) { 
291:	_buildNumber = st.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
33:	if (reader.hasMoreTokens()) { 
34:	return reader.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
104:	final StringTokenizer strtok = new StringTokenizer(attrName, "|"); 
-
115:	if (strtok.countTokens() == 2) 
-
117:	final String tkNamespace = strtok.nextToken(); 
-
130:	name = strtok.nextToken(); 
-
134:	name = strtok.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
104:	tokenizer = new StringTokenizer(value, "(, )"); 
-
110:	if (tokenizer.countTokens() != 4) 
-
115:	GLatLng sw = new GLatLng(Float.valueOf(tokenizer.nextToken()), Float.valueOf(tokenizer.nextToken())); 
116:	GLatLng ne = new GLatLng(Float.valueOf(tokenizer.nextToken()), Float.valueOf(tokenizer.nextToken())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
38:	StringTokenizer st = new StringTokenizer(names, ","); 
39:	if (st.countTokens() > 0) { 
40:	id = st.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
38:	StringTokenizer token=new StringTokenizer(street, ","); 
-
42:	if(token.countTokens()==2){ 
43:	String temp=token.nextToken(); 
-
50:	temp=token.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
30:	StringTokenizer stringtokenizer = new StringTokenizer(s, "."); 
31:	switch(stringtokenizer.countTokens()) 
-
35:	table_ = new String(stringtokenizer.nextToken()); 
-
37:	column_ = new String(stringtokenizer.nextToken()); 
-
43:	schema_ = new String(stringtokenizer.nextToken()); 
44:	table_ = new String(stringtokenizer.nextToken()); 
-
47:	table_ = new String(stringtokenizer.nextToken()); 
48:	column_ = new String(stringtokenizer.nextToken()); 
-
54:	schema_ = new String(stringtokenizer.nextToken()); 
55:	table_ = new String(stringtokenizer.nextToken()); 
56:	column_ = new String(stringtokenizer.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
120:	new StringTokenizer(line, " \t\n\r\f%"); 
-
122:	this.filesystem = tokens.nextToken(); 
123:	if (!tokens.hasMoreTokens()) {            // for long filesystem name 
-
130:	Long.parseLong(tokens.nextToken()); // skip capacity 
131:	Long.parseLong(tokens.nextToken()); // skip used 
132:	Long.parseLong(tokens.nextToken()); // skip available 
133:	Integer.parseInt(tokens.nextToken()); // skip percentUsed 
134:	this.mount = tokens.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
13:	StringTokenizer stringtokenizer = new StringTokenizer(str, set); 
-
15:	if(stringtokenizer.hasMoreTokens()){ 
16:	String rtn = stringtokenizer.nextToken(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: countTokens, hasMoreTokens, nextToken
56:	StringTokenizer st = new StringTokenizer(s, " "); 
-
59:	st.nextToken(); 
-
62:	if (st.countTokens() >= 1) 
-
65:	while (st.hasMoreTokens()) 
-
67:	String location = st.nextToken().trim(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreElements, nextToken
54:	final StringTokenizer entryTokenizer = new StringTokenizer(currentRangeString, "-"); 
55:	final String fromAsString = entryTokenizer.nextToken().trim(); 
-
57:	if (entryTokenizer.hasMoreElements()) { 
58:	toAsString = entryTokenizer.nextToken().trim(); 
-
61:	if (entryTokenizer.hasMoreElements()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, hasMoreTokens, nextToken
106:	StringTokenizer tokenizer = new StringTokenizer(s, ":"); 
107:	int count = tokenizer.countTokens(); 
-
109:	long id = Long.parseLong(tokenizer.nextToken()); 
-
111:	if (tokenizer.hasMoreTokens()) { 
112:	version = Long.parseLong(tokenizer.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
49:	StringTokenizer stok = new StringTokenizer(line, _delimiter); 
-
53:	if (stok.hasMoreTokens()) _string1 = stok.nextToken(); 
-
57:	if (stok.hasMoreTokens()) _string2 = stok.nextToken(); 
-
61:	if (stok.hasMoreTokens()) 
-
63:	_match = Integer.parseInt(stok.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
110:	StringTokenizer st = new StringTokenizer(response,":"); 
111:	if(st.countTokens() < 3){ 
-
117:	st.nextToken(); //Discard first token, it's basically what we have send 
118:	String command = st.nextToken().trim().toUpperCase(); 
-
120:	if(command.equals("USERID") && st.countTokens() >= 2){ 
-
122:	hostType = st.nextToken().trim(); 
123:	userName = st.nextToken("").substring(1);//Get all that is left 
-
126:	errorMessage = st.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
201:	final StringTokenizer st = new StringTokenizer ( rgb, separator, false ); 
202:	final int count = st.countTokens (); 
-
205:	return new Color ( Integer.parseInt ( st.nextToken () ), Integer.parseInt ( st.nextToken () ), 
206:	Integer.parseInt ( st.nextToken () ) ); 
-
210:	return new Color ( Integer.parseInt ( st.nextToken () ), Integer.parseInt ( st.nextToken () ), 
211:	Integer.parseInt ( st.nextToken () ), Integer.parseInt ( st.nextToken () ) ); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
83:	StringTokenizer tok = new StringTokenizer( distrAsString.substring( 1 ), "(,) " ); 
84:	return new GaussianDistribution( tok.hasMoreTokens() ? Double.valueOf( tok.nextToken() ) : 0.0, 
85:	tok.hasMoreTokens() ? Double.valueOf( tok.nextToken() ) : 1.0, 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
44:	StringTokenizer st = new StringTokenizer(authHeader); 
45:	if (st.hasMoreTokens()) { 
46:	String basic = st.nextToken(); 
-
48:	String userPass = new String(Base64.decode(st.nextToken())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
44:	final StringTokenizer st = new StringTokenizer(initialSize, "x"); 
45:	if (st.countTokens() == 2) { 
-
48:	width = Integer.valueOf(st.nextToken().trim()).intValue(); 
49:	height = Integer.valueOf(st.nextToken().trim()).intValue(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreElements, nextToken
99:	final StringTokenizer strtok = new StringTokenizer(locale, "_"); 
-
101:	if (strtok.hasMoreElements()) 
-
103:	retval[0] = strtok.nextToken(); 
-
109:	if (strtok.hasMoreElements()) 
-
111:	retval[1] = strtok.nextToken(); 
-
117:	if (strtok.hasMoreElements()) 
-
119:	retval[2] = strtok.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
49:	StringTokenizer rangeToken = new StringTokenizer(weightRangeString, ".."); 
-
51:	if (rangeToken.countTokens() == 2) { 
52:	String weightString = rangeToken.nextToken().trim(); 
-
58:	int end = Integer.parseInt(rangeToken.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
53:	StringTokenizer t = new StringTokenizer(uri, "/"); 
54:	if (t.countTokens() != 2) 
-
58:	t.nextToken();  // skip servlet name 
59:	String workflowDefinitionId = t.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: nextToken
161:	StringTokenizer st = new StringTokenizer("This is a test String"); 
-
163:	"This", st.nextToken(" ")); 
-
165:	" is a ", st.nextToken("tr")); 
-
167:	"es", st.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: hasMoreTokens, nextToken
66:	String level = tokenizer.nextToken("123456789"); 
-
71:	String dot = tokenizer.nextToken(".\n"); 
-
76:	String heading = tokenizer.hasMoreTokens() ? tokenizer.nextToken("\n") : ""; 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, hasMoreTokens, nextToken
34:	StringTokenizer st = new StringTokenizer(commandLine); 
-
40:	if (st.countTokens() > 1) 
-
42:	st.nextToken(); 
43:	String firstOption = st.nextToken(); 
-
46:	if (st.hasMoreTokens()) 
-
48:	checkOption(st.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
99:	tokenizer = new StringTokenizer(value, "(, )"); 
-
105:	if (tokenizer.countTokens() != 4) 
-
110:	LonLat sw = new LonLat(Float.valueOf(tokenizer.nextToken()), 
111:	Float.valueOf(tokenizer.nextToken())); 
112:	LonLat ne = new LonLat(Float.valueOf(tokenizer.nextToken()), 
113:	Float.valueOf(tokenizer.nextToken())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
201:	final StringTokenizer tokenizer = new StringTokenizer(boundsAsText, ","); 
202:	if (tokenizer.countTokens() == 4) 
-
204:	final double x = Double.parseDouble(tokenizer.nextToken()); 
205:	final double y = Double.parseDouble(tokenizer.nextToken()); 
206:	final double width = Double.parseDouble(tokenizer.nextToken()); 
207:	final double height = Double.parseDouble(tokenizer.nextToken()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
44:	StringTokenizer st = new StringTokenizer(names, ","); 
45:	if (st.countTokens() > 0) { 
46:	id = st.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
133:	final StringTokenizer st = new StringTokenizer(response, ":"); 
134:	if (st.countTokens() < 3) { 
-
140:	st.nextToken(); // Discard first token, it's basically what we have send 
141:	final String command = st.nextToken().trim().toUpperCase(); 
-
143:	if (command.equals("USERID") && (st.countTokens() >= 2)) { 
-
145:	hostType = st.nextToken().trim(); 
146:	userName = st.nextToken("").substring(1);// Get all that is left 
-
149:	errorMessage = st.nextToken(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, hasMoreTokens, nextToken
164:	StringTokenizer tokenizer = new StringTokenizer(csvResources, ",;"); 
165:	int len = tokenizer.countTokens(); 
-
176:	while(tokenizer.hasMoreTokens()) 
-
178:	Resource resource = Resource.newResource(tokenizer.nextToken().trim()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: countTokens, nextToken
123:	StringTokenizer st = new StringTokenizer(uri, "/"); 
124:	String prefix = st.nextToken(); 
125:	if ( ! prefix.equals("asset") || st.countTokens() < 1 || st.countTokens() > 2 || uri.trim().endsWith("/")) 
-
129:	String urlSafeObjectId = st.nextToken(); 
Full Snippet Info
6
CodeRank
Related Java 8 StringTokenizer Questions & Answers:
See Code Examples for Java 8 StringTokenizer Methods: