FPGAttributeSet implements Comparable<FPGAttributeSet> { public boolean contains(FPGAttributeSet other) { Map<String, String> otherItems = other.items; for (Map.Entry<String, String> oEntry : otherItems.entrySet()) { String colName = oEntry.getKey(); String colValue = oEntry.getValue(); boolean match = false; if (items.containsKey(colName) && items.get(colName).equals(colValue)) { continue; } else { return false; } } return true; } FPGAttributeSet(FPGItemsetResult its, AttributeEncoder encoder);  FPGAttributeSet(double support,
                           double numRecords,
                           double ratioToInliers,
                           Map<String, String> items); boolean contains(FPGAttributeSet other); String prettyPrint(); double getSupport(); double getNumRecords(); double getRatioToInliers(); void setRatioToInliers(double ratio); Map<String, String> getItems(); @Override String toString(); @Override int compareTo(FPGAttributeSet o);  }
@Test public void testSimple() throws Exception { Map<String, String> v1 = new HashMap<>(); v1.put("c1", "val1"); v1.put("c2", "val2"); Map<String, String> v2 = new HashMap<>(); v2.put("c2", "val2"); FPGAttributeSet a1 = new FPGAttributeSet( .2, 10.0, 21.2, v1 ); FPGAttributeSet a2 = new FPGAttributeSet( .7, 30.0, 25.0, v2 ); assertTrue(a1.contains(a2)); }