public SimulationSet() { this(new Min(), new Max(), new Mean(), new TimeUnit(), new StandardDeviation(), new DistributionType(), new Quantity(), new WorkingHours(), new UnitCost(), new Currency()); }
@Override public boolean equals(Object o) { if (o instanceof SimulationSet) { SimulationSet other = (SimulationSet) o; return min.equals(other.min) && max.equals(other.max) && mean.equals(other.mean) && timeUnit.equals(other.timeUnit) && standardDeviation.equals(other.standardDeviation) && distributionType.equals(other.distributionType) && quantity.equals(other.quantity) && workingHours.equals(other.workingHours) && unitCost.equals(other.unitCost) && currency.equals(other.currency); } return false; } }
@Override public int hashCode() { return HashUtil.combineHashCodes(min.hashCode(), max.hashCode(), mean.hashCode(), timeUnit.hashCode(), standardDeviation.hashCode(), distributionType.hashCode(), quantity.hashCode(), workingHours.hashCode(), unitCost.hashCode(), currency.hashCode()); }
simulationSet.getDistributionType().getValue()); assertEquals(Double.valueOf(123), simulationSet.getUnitCost().getValue()); assertEquals(Double.valueOf(999), simulationSet.getWorkingHours().getValue());
simulationSet.getUnitCost().setValue(extractDouble(costParams.getUnitCost()));
@Test @SuppressWarnings("unchecked") public void testUnmarshallSimulationProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(BPMN_SIMULATIONPROPERTIES); assertDiagram(diagram, 4); assertEquals("SimulationProperties", diagram.getMetadata().getTitle()); UserTask userTask = findContent(diagram, UserTask.class); SimulationSet simulationSet = userTask.getSimulationSet(); assertEquals(Double.valueOf(111), simulationSet.getQuantity().getValue()); assertEquals("poisson", simulationSet.getDistributionType().getValue()); assertEquals(Double.valueOf(123), simulationSet.getUnitCost().getValue()); assertEquals(Double.valueOf(999), simulationSet.getWorkingHours().getValue()); assertEquals(Double.valueOf(321), simulationSet.getMean().getValue()); }
simulationSet.getUnitCost().setValue(extractDouble(costParams.getUnitCost()));
Double unitCost = simulationSet.getUnitCost().getValue(); Double quantity = simulationSet.getQuantity().getValue(); Double workingHours = simulationSet.getWorkingHours().getValue();