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.
+ Save this method
Example 1
Project: incubator-netbeans   File: TaskCache.java   View Source Code 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);
}