Skip to content

Commit

Permalink
Merge pull request #198 from HHS/util-package-restructure
Browse files Browse the repository at this point in the history
Util package restructure
  • Loading branch information
bischoffz authored Feb 4, 2024
2 parents f5a4bc5 + d7bda82 commit cf15e01
Show file tree
Hide file tree
Showing 484 changed files with 1,035 additions and 1,043 deletions.
7 changes: 0 additions & 7 deletions gcm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

<!-- dependency versions -->
<util.version>4.1.0-SNAPSHOT</util.version>
<mockito-core.version>3.11.2</mockito-core.version>
<jacoco-maven-plugin.version>0.8.9</jacoco-maven-plugin.version>
<junit-jupiter-engine.version>5.8.2</junit-jupiter-engine.version>
</properties>
Expand All @@ -72,12 +71,6 @@
<artifactId>util</artifactId>
<version>${util.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.function.Consumer;
import java.util.function.Function;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An actor context provides access to the nucleus engine and published data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gov.hhs.aspr.ms.gcm.nucleus;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Base class for all data managers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.function.Consumer;
import java.util.function.Function;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A data manager context provides access to the nucleus engine and other data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;
import java.util.Map;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A context containing PluginData and PluginDataBuilder instances that are used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import org.apache.commons.math3.util.Pair;

import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* A generics-based data class for collecting an ordered list of predicates of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import java.util.concurrent.Executors;
import java.util.function.Consumer;

import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* An experiment provides a means for executing the simulation over variants of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.util.function.Consumer;

import gov.hhs.aspr.ms.gcm.nucleus.util.TriConsumer;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.ThreadSafe;
import util.errors.ContractException;

/**
* Interface for the thread safe access of experiment/scenario state and meta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.Optional;
import java.util.Set;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An experiment provides a means for executing the simulation over variants of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import java.util.function.Consumer;

import gov.hhs.aspr.ms.gcm.nucleus.util.TriConsumer;
import gov.hhs.aspr.ms.util.errors.ContractException;
import gov.hhs.aspr.ms.util.time.TimeElapser;
import net.jcip.annotations.NotThreadSafe;
import net.jcip.annotations.ThreadSafe;
import util.errors.ContractException;
import util.time.TimeElapser;

/**
* A utility class used by the experiment to manage experiment context consumers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.function.Function;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

public final class IdentifiableFunction<N> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.util.Map;
import java.util.function.Function;

import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

@Immutable
public final class IdentifiableFunctionMap<N> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.nucleus;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gov.hhs.aspr.ms.gcm.nucleus;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Class supporting serialization of plans
Expand Down
2 changes: 1 addition & 1 deletion gcm/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.Set;
import java.util.function.Consumer;

import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.ThreadSafe;
import util.errors.ContractException;

/**
* A plugin is the main compositional element of an experiment. Plugins contain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Optional;
import java.util.function.Consumer;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A plugin context provides plugin's the ability to add actors and data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gov.hhs.aspr.ms.gcm.nucleus;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A container for PluginDataBuilder instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;
import java.util.Map;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An implementor of PluginDataBuilderContainer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.function.Consumer;
import java.util.function.Function;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An report context provides access to the nucleus simulation. It is supplied
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gov.hhs.aspr.ms.gcm.nucleus;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A convenience class for representing PluginId as a wrapped object.
Expand Down
14 changes: 7 additions & 7 deletions gcm/src/main/java/gov/hhs/aspr/ms/gcm/nucleus/Simulation.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

import org.apache.commons.math3.util.Pair;

import gov.hhs.aspr.ms.util.errors.ContractException;
import gov.hhs.aspr.ms.util.graph.Graph;
import gov.hhs.aspr.ms.util.graph.GraphDepthEvaluator;
import gov.hhs.aspr.ms.util.graph.Graphs;
import gov.hhs.aspr.ms.util.graph.MutableGraph;
import gov.hhs.aspr.ms.util.path.MapPathSolver;
import gov.hhs.aspr.ms.util.path.Path;
import net.jcip.annotations.NotThreadSafe;
import util.errors.ContractException;
import util.graph.Graph;
import util.graph.GraphDepthEvaluator;
import util.graph.Graphs;
import util.graph.MutableGraph;
import util.path.MapPathSolver;
import util.path.Path;

/**
* An instance of the Simulation orchestrates the execution of a scenario from a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.util.ArrayList;
import java.util.List;

import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* An immutable data class that holds 1) the base date aligned to simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.nucleus.testsupport.runcontinuityplugin;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.nucleus.testsupport.runcontinuityplugin;

import gov.hhs.aspr.ms.gcm.nucleus.Plugin;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.ThreadSafe;
import util.errors.ContractException;

/**
* A plugin providing a person property management to the simulation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.function.Consumer;

import gov.hhs.aspr.ms.gcm.nucleus.ActorContext;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Test Support class that describes an action for an actor as a scheduled plan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.function.Consumer;

import gov.hhs.aspr.ms.gcm.nucleus.DataManagerContext;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Test Support class that describes an action for a data manager as a scheduled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.hhs.aspr.ms.gcm.nucleus.testsupport.testplugin;

import util.errors.ContractError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An enumeration supporting {@link ContractException} that acts as a general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.Optional;
import java.util.function.Consumer;

import util.errors.ContractException;
import util.wrappers.MutableInteger;
import gov.hhs.aspr.ms.util.errors.ContractException;
import gov.hhs.aspr.ms.util.wrappers.MutableInteger;

/**
* A Testing utility class that will consume simulation output and includes a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import gov.hhs.aspr.ms.gcm.nucleus.Plugin;
import gov.hhs.aspr.ms.gcm.nucleus.PluginContext;
import gov.hhs.aspr.ms.gcm.nucleus.PluginId;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Static test support plugin that is designed to work with a unit testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import gov.hhs.aspr.ms.gcm.nucleus.PluginData;
import gov.hhs.aspr.ms.gcm.nucleus.PluginDataBuilder;
import gov.hhs.aspr.ms.gcm.nucleus.PluginId;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.ThreadSafe;
import util.errors.ContractException;

/**
* Thread safe plugin data container for associating plans with actor and data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import gov.hhs.aspr.ms.gcm.nucleus.NucleusError;
import gov.hhs.aspr.ms.gcm.nucleus.Plugin;
import gov.hhs.aspr.ms.gcm.nucleus.PluginData;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A static test support class for the {@linkplain TestPlugin}. Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.function.Consumer;

import gov.hhs.aspr.ms.gcm.nucleus.ReportContext;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Test Support class that describes an action for an actor as a scheduled plan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import gov.hhs.aspr.ms.gcm.nucleus.Plugin;
import gov.hhs.aspr.ms.gcm.nucleus.Simulation;
import gov.hhs.aspr.ms.gcm.nucleus.SimulationState;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A Testing utility class that will execute a simulation given a list of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.reports.GlobalPropertyReport;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.reports.GlobalPropertyReportPluginData;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertiesError;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A plugin providing a global property data manager to the simulation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyInitialization;
import gov.hhs.aspr.ms.gcm.plugins.properties.support.PropertyDefinition;
import gov.hhs.aspr.ms.gcm.plugins.properties.support.PropertyError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A mutable data manager for global properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.properties.support.PropertyDefinition;
import gov.hhs.aspr.ms.gcm.plugins.properties.support.PropertyError;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.Immutable;
import util.errors.ContractException;

/**
* An immutable container of the initial state of global components and global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import gov.hhs.aspr.ms.gcm.nucleus.Event;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.properties.support.PropertyError;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* An event released by the global data manager whenever a global property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportHeader;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportItem;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* A Report that displays assigned global property values over time. Fields Time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import gov.hhs.aspr.ms.gcm.plugins.properties.support.PropertyError;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportError;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.util.errors.ContractException;
import net.jcip.annotations.ThreadSafe;
import util.errors.ContractException;

/**
* A PluginData class supporting GlobalPropertyReport construction.
Expand Down
Loading

0 comments on commit cf15e01

Please sign in to comment.