Skip to content

Commit

Permalink
remove the "Factory" suffix from a few field names
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaspayette committed Nov 15, 2024
1 parent 0ecd426 commit 7fedbe9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
public class CurrentCellFisheableFactory<C extends Content<C>>
extends VesselScopeFactory<Supplier<Fisheable<C>>> {

private Factory<? extends FisheableGrid<C>> fisheableGridFactory;
private Factory<? extends FisheableGrid<C>> fisheableGrid;

@Override
protected Supplier<Fisheable<C>> newInstance(
final Simulation simulation,
final Vessel vessel
) {
return new CurrentCellFisheable<>(vessel, fisheableGridFactory.get(simulation));
return new CurrentCellFisheable<>(vessel, fisheableGrid.get(simulation));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class VesselFactory implements Factory<Vessel> {
@NonNull private BehaviourFactory<?> initialBehaviour;
@NonNull private Factory<? extends IdSupplier> idSupplier;
@NonNull private Factory<? extends VesselField> vesselField;
@NonNull private Factory<? extends Port> portFactory;
@NonNull private Factory<? extends Port> homePort;
@NonNull private Factory<? extends PortGrid> portGrid;
private double speed;

Expand All @@ -50,7 +50,7 @@ public final Vessel get(final Simulation simulation) {
final var vessel = new Vessel(
idSupplier.get(simulation).nextId(),
portGrid.get(simulation),
portFactory.get(simulation),
homePort.get(simulation),
speed,
vesselField,
new ForwardingEventManager(simulation.getEventManager())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
@EqualsAndHashCode(callSuper = false)
abstract class RelativeDateTimeFactory implements Factory<LocalDateTime> {

@NonNull private Factory<? extends LocalDateTime> referenceDateTimeFactory;
@NonNull private Factory<? extends TemporalAmount> temporalAmountFactory;
@NonNull private Factory<? extends LocalDateTime> referenceDateTime;
@NonNull private Factory<? extends TemporalAmount> temporalAmount;

@Override
public LocalDateTime get(final Simulation simulation) {
return operation(
referenceDateTimeFactory.get(simulation),
temporalAmountFactory.get(simulation)
referenceDateTime.get(simulation),
temporalAmount.get(simulation)
);
}

Expand Down

0 comments on commit 7fedbe9

Please sign in to comment.