diff --git a/src/org/opensha2/calc/NamedLocation.java b/src/org/opensha2/calc/NamedLocation.java index a4cf4451f23b2bec27b41bc55537db626491411f..52cd423d62d68283a750158ebc2d7a423b0f550a 100644 --- a/src/org/opensha2/calc/NamedLocation.java +++ b/src/org/opensha2/calc/NamedLocation.java @@ -14,6 +14,6 @@ public interface NamedLocation { /** * Return the location. */ - public Location location(); + Location location(); } diff --git a/src/org/opensha2/data/XY_Point.java b/src/org/opensha2/data/XY_Point.java index 4df7f172dc61e20579458ee4a713d031a54fcb63..d425aad9f790ce4656a649267d1e53692f802714 100644 --- a/src/org/opensha2/data/XY_Point.java +++ b/src/org/opensha2/data/XY_Point.java @@ -11,19 +11,19 @@ public interface XY_Point { * Return the x-value of this point. * @return x */ - public double x(); + double x(); /** * Return the y-value of this point. * @return x */ - public double y(); + double y(); /** * Set the y-value of this point. * @param y */ - public void set(double y); + void set(double y); } diff --git a/src/org/opensha2/data/XY_Sequence.java b/src/org/opensha2/data/XY_Sequence.java index aa4455e1d0a3b2c673fb8dd7eb2bace516e25cf1..4134c5af22a0d861a557d9ea9b17a02f781f6dc2 100644 --- a/src/org/opensha2/data/XY_Sequence.java +++ b/src/org/opensha2/data/XY_Sequence.java @@ -17,7 +17,7 @@ public interface XY_Sequence extends Iterable<XY_Point> { * @throws IndexOutOfBoundsException if the index is out of range ( * {@code index < 0 || index >= size()}) */ - public double x(int index); + double x(int index); /** * Returns the y-value at {@code index}. @@ -26,7 +26,7 @@ public interface XY_Sequence extends Iterable<XY_Point> { * @throws IndexOutOfBoundsException if the index is out of range ( * {@code index < 0 || index >= size()}) */ - public double y(int index); + double y(int index); /** * Sets the y-{@code value} at {@code index}. @@ -35,24 +35,24 @@ public interface XY_Sequence extends Iterable<XY_Point> { * @throws IndexOutOfBoundsException if the index is out of range ( * {@code index < 0 || index >= size()}) */ - public void set(int index, double value); + void set(int index, double value); /** * Returns the number or points in this sequence. * @return the sequence size */ - public int size(); + int size(); /** * Returns an immutable {@code List} of the sequence x-values. * @return the {@code List} of x-values */ - public List<Double> xValues(); + List<Double> xValues(); /** * Returns an immutable {@code List} of the sequence y-values. * @return the {@code List} of y-values */ - public List<Double> yValues(); + List<Double> yValues(); } diff --git a/src/org/opensha2/eq/model/GridSourceSet.java b/src/org/opensha2/eq/model/GridSourceSet.java index e0beb00741c5f1e6f047685b63872aef7cd6553f..0e5258085b853dddcf6ff9de2d5be0e238f4ee98 100644 --- a/src/org/opensha2/eq/model/GridSourceSet.java +++ b/src/org/opensha2/eq/model/GridSourceSet.java @@ -3,11 +3,9 @@ package org.opensha2.eq.model; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; -import static org.opensha2.data.DataUtils.validateWeight; import static org.opensha2.eq.Magnitudes.MAX_MAG; import static org.opensha2.eq.fault.Faults.validateStrike; import static org.opensha2.eq.model.PointSourceType.FIXED_STRIKE; -import static org.opensha2.util.TextUtils.validateName; import java.util.Collections; import java.util.Iterator; diff --git a/src/org/opensha2/gmm/GroundMotionModel.java b/src/org/opensha2/gmm/GroundMotionModel.java index c3f7a21e72b4d4b4e1b8655b0114fcae5d0edab5..8a8bea1f5c982c73c53f6c8763e2a9bf5ed394b8 100644 --- a/src/org/opensha2/gmm/GroundMotionModel.java +++ b/src/org/opensha2/gmm/GroundMotionModel.java @@ -25,6 +25,6 @@ public interface GroundMotionModel { * @param args a ground motion model input argument container * @return a scalar ground motion wrapper */ - public ScalarGroundMotion calc(GmmInput args); + ScalarGroundMotion calc(GmmInput args); } diff --git a/src/org/opensha2/gmm/ScalarGroundMotion.java b/src/org/opensha2/gmm/ScalarGroundMotion.java index a961d5c8478512963620351b2ed298ad81713326..c63073fd3cc154f6d7b256ca2bcc237df671bfa7 100644 --- a/src/org/opensha2/gmm/ScalarGroundMotion.java +++ b/src/org/opensha2/gmm/ScalarGroundMotion.java @@ -11,12 +11,12 @@ public interface ScalarGroundMotion { * Returns the mean (natural log of the median) ground motion. * @return the mean */ - public double mean(); + double mean(); /** * Returns the standard deviation in natural log units. * @return the standard deviation */ - public double sigma(); + double sigma(); } diff --git a/src/org/opensha2/programs/HazardCurve.java b/src/org/opensha2/programs/HazardCurve.java index ebc1a95aa6857bb26549a34ad2d8c609cf449dc4..1d0889b47ed4a4418fd21f9f2898805e104e4db0 100644 --- a/src/org/opensha2/programs/HazardCurve.java +++ b/src/org/opensha2/programs/HazardCurve.java @@ -77,6 +77,7 @@ public class HazardCurve { * example calculations</a> */ public static void main(String[] args) { + // delegate to run which has a return value for testing String status = run(args); if (status != null) { System.err.print(status); @@ -138,6 +139,7 @@ public class HazardCurve { .toString(); } } + private static final OpenOption[] WRITE_OPTIONS = new OpenOption[] {}; private static final OpenOption[] APPEND_OPTIONS = new OpenOption[] { APPEND }; @@ -155,8 +157,8 @@ public class HazardCurve { Optional<Executor> executor = Optional.<Executor> of(execSvc); log.info("Hazard Curve: calculating ..."); - Stopwatch batchWatch = Stopwatch.createUnstarted(); - Stopwatch totalWatch = Stopwatch.createUnstarted(); + Stopwatch batchWatch = Stopwatch.createStarted(); + Stopwatch totalWatch = Stopwatch.createStarted(); int count = 0; List<HazardResult> results = new ArrayList<>(); @@ -210,8 +212,6 @@ public class HazardCurve { Site site, Optional<Executor> executor) { - // TODO does this even need to be public? - Executor ex = executor.or(createExecutor()); try { diff --git a/src/org/opensha2/util/Named.java b/src/org/opensha2/util/Named.java index 13870fb616b93dada3b7bacc7ae3c967e9904fce..a2665e02204252897d085aa0778c3cb7c7810e87 100644 --- a/src/org/opensha2/util/Named.java +++ b/src/org/opensha2/util/Named.java @@ -14,6 +14,6 @@ public interface Named { * Returns an object's display name. * @return the name */ - public String name(); + String name(); }