All Downloads are FREE. Search and download functionalities are using the official Maven repository.

overflowdb.util.PropertyHelper Maven / Gradle / Ivy

There is a newer version: 1.115
Show newest version
package overflowdb.util;

import java.util.Iterator;
import java.util.Map;

public class PropertyHelper {

  public static final Object[] toKeyValueArray(Map keyValues) {
    final Object[] keyValuesArray = new Object[keyValues.size() * 2];
    int i = 0;
    final Iterator> iterator = keyValues.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry entry = iterator.next();
      keyValuesArray[i++] = entry.getKey();
      keyValuesArray[i++] = entry.getValue();
    }
    return keyValuesArray;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy