
com.github.markusbernhardt.selenium2library.utils.Python Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robotframework-selenium2library-java Show documentation
Show all versions of robotframework-selenium2library-java Show documentation
Java port of the Selenium 2 (WebDriver) Python library for Robot Framework
package com.github.markusbernhardt.selenium2library.utils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public abstract class Python {
public static String join(String glue, String[] strings) {
return join(glue, Arrays.asList(strings));
}
public static String join(String glue, Iterable strings) {
if (strings == null) {
return null;
}
StringBuilder stringBuilder = new StringBuilder();
String verkett = "";
for (String string : strings) {
stringBuilder.append(verkett);
stringBuilder.append(string);
verkett = glue;
}
return stringBuilder.toString();
}
public static Map zip(List keys, List values) {
if (keys.size() != values.size()) {
return null;
}
Map map = new HashMap();
Iterator valueIterator = values.listIterator();
for (A key : keys) {
map.put(key, valueIterator.next());
}
return map;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy