Java Dictionary Usage updateConfigurableListField(Dictionary properties, String propertyName)

Here you can find the source of updateConfigurableListField(Dictionary properties, String propertyName)

Description

update Configurable List Field

License

Open Source License

Declaration

public static List<String> updateConfigurableListField(Dictionary<String, ?> properties, String propertyName) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.Dictionary;

import java.util.List;

public class Main {
    public static List<String> updateConfigurableListField(Dictionary<String, ?> properties, String propertyName) {
        int index = 0;
        List<String> configurableList = new ArrayList<String>();
        while (properties.get(propertyName + index) != null) {
            String propertyValue = (String) properties.get(propertyName + index++);
            if (propertyValue != null && !propertyValue.isEmpty())
                configurableList.add(propertyValue);
        }//from w w  w  . j  a v  a  2s .  c  o m
        return configurableList;
    }
}

Related

  1. getString(Dictionary p, Object key, String defaultValue)
  2. isNullOrNothing(final Object[] array)
  3. parseRequestOption(Dictionary conf, String confParam, Map requestOptions)
  4. setDefault(Dictionary dict, String key, String value)
  5. setProperty(Dictionary properties, String key, String value)