SinglePointCrossover extends CrossoverOperation { @Override public void setProperties(Properties p) { super.setProperties(p); String value; boolean b = false; String key; try { key = Constants.FIXED_POINT_CROSSOVER; value = p.getProperty(key); if (value != null) { if (value.equals(Constants.TRUE)) { b = true; } } } catch(Exception e) { logger.warn(e+" using default: "+b); } this.fixedCrossoverPoint = b; b = false; key = Constants.CODONS_USED_SENSITIVE; value = p.getProperty(key); if (value != null) { if (value.equals(Constants.TRUE)) { b = true; } } this.codonsUsedSensitive = b; } @SuppressWarnings({"SameParameterValue"})  SinglePointCrossover(RandomNumberGenerator m, double prob);  SinglePointCrossover(RandomNumberGenerator m, Properties p); @Override void setProperties(Properties p); void doOperation(Individual operands); void doOperation(List<Individual> operands); void makeNewChromosome(final GEChromosome c1, final GEChromosome c2,
            final int p1maxXOPoint, final int p2maxXOPoint); boolean isFixedCrossoverPoint(); @SuppressWarnings({"SameParameterValue"}) void setFixedCrossoverPoint(boolean fixedCrossoverPoint); static void main(String[] args);  }
@Test public void testSetProperties() { System.out.println("*SinglePointCrossoverTest: setProperties"); Properties p = new Properties(); SinglePointCrossover instance = new SinglePointCrossover(new MersenneTwisterFast(0), p); instance.setProperties(p); assertEquals(false, instance.fixedCrossoverPoint); assertEquals(false, instance.codonsUsedSensitive); p.setProperty(Constants.FIXED_POINT_CROSSOVER,"true"); p.setProperty(Constants.CODONS_USED_SENSITIVE,"true"); instance.setProperties(p); assertEquals(true, instance.fixedCrossoverPoint); assertEquals(true, instance.codonsUsedSensitive); }