use of java.util.StringTokenizer in project android_frameworks_base by ParanoidAndroid.
the class ColladaParser method parseFloat4.
private Float4 parseFloat4(String valueString) {
StringTokenizer st = new StringTokenizer(valueString);
float x = Float.parseFloat(st.nextToken());
float y = Float.parseFloat(st.nextToken());
float z = Float.parseFloat(st.nextToken());
float w = Float.parseFloat(st.nextToken());
return new Float4(x, y, z, w);
}
use of java.util.StringTokenizer in project android_frameworks_base by ParanoidAndroid.
the class ColladaParser method parseFloat3.
private Float3 parseFloat3(String valueString) {
StringTokenizer st = new StringTokenizer(valueString);
float x = Float.parseFloat(st.nextToken());
float y = Float.parseFloat(st.nextToken());
float z = Float.parseFloat(st.nextToken());
return new Float3(x, y, z);
}
use of java.util.StringTokenizer in project che by eclipse.
the class PreferenceConstants method getExcludedCompletionProposalCategories.
// /**
// * Encodes a JRE library to be used in the named preference <code>NEWPROJECT_JRELIBRARY_LIST</code>.
// *
// * @param description a string value describing the JRE library. The description is used
// * to identify the JDR library in the UI
// * @param entries an array of classpath entries to be encoded
// *
// * @return the encoded string.
// */
// public static String encodeJRELibrary(String description, IClasspathEntry[] entries) {
// return NewJavaProjectPreferencePage.encodeJRELibrary(description, entries);
// }
//
// /**
// * Decodes an encoded JRE library and returns its description string.
// * @param encodedLibrary the encoded library
// * @return the description of an encoded JRE library
// *
// * @see #encodeJRELibrary(String, IClasspathEntry[])
// */
// public static String decodeJRELibraryDescription(String encodedLibrary) {
// return NewJavaProjectPreferencePage.decodeJRELibraryDescription(encodedLibrary);
// }
//
// /**
// * Decodes an encoded JRE library and returns its class path entries.
// * @param encodedLibrary the encoded library
// * @return the array of classpath entries of an encoded JRE library.
// *
// * @see #encodeJRELibrary(String, IClasspathEntry[])
// */
// public static IClasspathEntry[] decodeJRELibraryClasspathEntries(String encodedLibrary) {
// return NewJavaProjectPreferencePage.decodeJRELibraryClasspathEntries(encodedLibrary);
// }
// /**
// * Returns the current configuration for the JRE to be used as default in new Java projects.
// * This is a convenience method to access the named preference <code>NEWPROJECT_JRELIBRARY_LIST
// * </code> with the index defined by <code> NEWPROJECT_JRELIBRARY_INDEX</code>.
// *
// * @return the current default set of class path entries
// *
// * @see #NEWPROJECT_JRELIBRARY_LIST
// * @see #NEWPROJECT_JRELIBRARY_INDEX
// */
// public static IClasspathEntry[] getDefaultJRELibrary() {
// return NewJavaProjectPreferencePage.getDefaultJRELibrary();
// }
/**
* Returns the completion proposal categories which
* are excluded from the default proposal list.
*
* @return an array with the IDs of the excluded categories
* @see #CODEASSIST_EXCLUDED_CATEGORIES
* @since 3.4
*/
public static String[] getExcludedCompletionProposalCategories() {
String encodedPreference = getPreference(CODEASSIST_EXCLUDED_CATEGORIES, null);
//$NON-NLS-1$
StringTokenizer tokenizer = new StringTokenizer(encodedPreference, "\0");
String[] result = new String[tokenizer.countTokens()];
for (int i = 0; i < result.length; i++) result[i] = tokenizer.nextToken();
return result;
}
use of java.util.StringTokenizer in project che by eclipse.
the class ExtensionsRegistry method read.
/**
* Reads the comma-separated value from the given configuration element for the given attribute name and remembers
* the configuration element in the given map under the individual tokens of the attribute value.
*
* @param attributeName the name of the attribute
* @param element the configuration element
* @param map the map which remembers the configuration element
*/
private void read(String attributeName, IConfigurationElement element, Map map) {
String value = element.getAttribute(attributeName);
if (value != null) {
//$NON-NLS-1$
StringTokenizer tokenizer = new StringTokenizer(value, ",");
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken().trim();
Set s = (Set) map.get(token);
if (s == null) {
s = new HashSet();
map.put(token, s);
}
s.add(element);
}
}
}
use of java.util.StringTokenizer in project che by eclipse.
the class QualifiedNameFinder method getFilePattern.
private static Pattern getFilePattern(String filePatterns) {
//$NON-NLS-1$
StringTokenizer tokenizer = new StringTokenizer(filePatterns, ",");
String[] filePatternArray = new String[tokenizer.countTokens()];
int i = 0;
while (tokenizer.hasMoreTokens()) {
filePatternArray[i++] = tokenizer.nextToken().trim();
}
return PatternConstructor.createPattern(filePatternArray, true, false);
}
Aggregations