public static Map<String, String> match( Table<Integer, String, String> table, Map<String, FieldValue> values) { Set<Integer> rowKeys = table.rowKeySet(); rows: for (Integer rowKey : rowKeys) { Map<String, String> row = table.row(rowKey); // A table row contains a certain number of input columns, plus an output column if (values.size() < (row.size() - 1)) { continue rows; } Collection<Map.Entry<String, FieldValue>> entries = values.entrySet(); for (Map.Entry<String, FieldValue> entry : entries) { String key = entry.getKey(); FieldValue value = entry.getValue(); String rowValue = row.get(key); if (rowValue == null) { continue rows; } boolean equals = value.equalsString(rowValue); if (!equals) { continue rows; } } return row; } return null; }