public static List<Pair<String, Object>> asPairs(final Object... keyValues) {
        final List<Object> list = Arrays.asList(keyValues);
        return IntStream.range(1, list.size())
                .filter(i -> i % 2 != 0)
                .mapToObj(i -> Pair.with(list.get(i - 1).toString(), list.get(i)))
                .collect(Collectors.toList());
    }
Convert a set of key values to a list of Pair objects.  Assumes that validations have already taken place to
assure that key positions contain strings and that there are an even number of elements.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java