Java Code Examples for java.util.Properties.values()

The following are Jave code examples for showing how to use values() of the java.util.Properties class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: incubator-netbeans   File: TaskCache.java   Source Code and License Vote up 5 votes
@NonNull
private static String computeFreeName(@NonNull final Properties props) {
    int lastUsed = 0;
    for (Object value : props.values()) {
        int current = Integer.parseInt((String)value);
        if (lastUsed < current) {
            lastUsed = current;
        }
    }
    return Integer.toString(lastUsed+1);
}