Package no.priv.garshol.duke

Examples of no.priv.garshol.duke.Comparator


    ConfigurationImpl cfg = new ConfigurationImpl();
    cfg.addDatabase(new InMemoryDatabase());
    cfg.addDataSource(0, csv);

    Comparator cmp = new ExactComparator();

    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("id"));
    props.add(new PropertyImpl("name", cmp, 0.0, 1.0));
    props.add(new PropertyImpl("age", cmp, 0.0, 1.0));
View Full Code Here


  ComparatorAspect aspect = new ComparatorAspect(aspectProp, compList);
 
  aspect.setRandomly(conf);
 
  Property updatedProp = config1.getPropertyByName(propName);
  Comparator randomComparator = updatedProp.getComparator();
    assertTrue("should have custom comparator set, but has : " + randomComparator.getClass(), randomComparator.equals(comparator));
  }
View Full Code Here

                              "in field " + fieldName);
    }
  }

  private boolean isFuzzy(String fieldName) {
    Comparator c = config.getPropertyByName(fieldName).getComparator();
    return c != null && c.isTokenized();
  }
View Full Code Here

TOP

Related Classes of no.priv.garshol.duke.Comparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.