From 9a4b8df0d10b4278bc1f4fa4af74d30005776c0f Mon Sep 17 00:00:00 2001 From: Merlijn van Deen Date: Thu, 26 Sep 2024 14:21:12 +0200 Subject: [PATCH] Generics: make compiler happy about nested extends Signed-off-by: Merlijn van Deen --- src/annotation/DataAnnotationType.java | 2 +- src/annotation/dataselect/AnnotationDataSelCreator.java | 2 +- src/annotation/dataselect/AnnotationDataSelector.java | 2 +- src/annotation/dataselect/ScalarDataSelector.java | 2 +- src/annotation/string/StringAnnotation.java | 4 ++-- src/annotation/string/StringAnnotationType.java | 2 +- src/annotation/timestamp/TimestampAnnotation.java | 4 ++-- src/annotation/timestamp/TimestampAnnotationType.java | 2 +- src/annotation/userforms/UserFormAnnotation.java | 4 ++-- src/annotation/userforms/UserFormAnnotationType.java | 4 ++-- src/export/MLExport/MLCPODExport.java | 2 +- src/export/MLExport/MLRawExport.java | 2 +- src/export/RExport/RCPODExport.java | 2 +- src/export/RExport/RRawExport.java | 2 +- src/export/wavExport/RawHolderWavExport.java | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/annotation/DataAnnotationType.java b/src/annotation/DataAnnotationType.java index e212e73b..a86d4df1 100644 --- a/src/annotation/DataAnnotationType.java +++ b/src/annotation/DataAnnotationType.java @@ -21,7 +21,7 @@ import generalDatabase.SQLLoggingAddon; * @see SoloAnnotationType * */ -public abstract class DataAnnotationType { +public abstract class DataAnnotationType> { public abstract String getAnnotationName(); diff --git a/src/annotation/dataselect/AnnotationDataSelCreator.java b/src/annotation/dataselect/AnnotationDataSelCreator.java index 539f0262..78b3af3e 100644 --- a/src/annotation/dataselect/AnnotationDataSelCreator.java +++ b/src/annotation/dataselect/AnnotationDataSelCreator.java @@ -5,7 +5,7 @@ import PamguardMVC.dataSelector.DataSelectorCreator; import annotation.DataAnnotation; import annotation.DataAnnotationType; -public abstract class AnnotationDataSelCreator extends DataSelectorCreator { +public abstract class AnnotationDataSelCreator> extends DataSelectorCreator { private DataAnnotationType dataAnnotationType; diff --git a/src/annotation/dataselect/AnnotationDataSelector.java b/src/annotation/dataselect/AnnotationDataSelector.java index 0c0a0320..3cc6cf34 100644 --- a/src/annotation/dataselect/AnnotationDataSelector.java +++ b/src/annotation/dataselect/AnnotationDataSelector.java @@ -7,7 +7,7 @@ import PamguardMVC.dataSelector.DataSelector; import annotation.DataAnnotation; import annotation.DataAnnotationType; -public abstract class AnnotationDataSelector extends DataSelector { +public abstract class AnnotationDataSelector> extends DataSelector { private DataAnnotationType annotationType; diff --git a/src/annotation/dataselect/ScalarDataSelector.java b/src/annotation/dataselect/ScalarDataSelector.java index 7e1566dd..e8c1a313 100644 --- a/src/annotation/dataselect/ScalarDataSelector.java +++ b/src/annotation/dataselect/ScalarDataSelector.java @@ -8,7 +8,7 @@ import annotation.DataAnnotation; import annotation.DataAnnotationType; import pamViewFX.fxSettingsPanes.DynamicSettingsPane; -public abstract class ScalarDataSelector extends AnnotationDataSelector { +public abstract class ScalarDataSelector> extends AnnotationDataSelector { /** * @return the scalarDataParams diff --git a/src/annotation/string/StringAnnotation.java b/src/annotation/string/StringAnnotation.java index e0613c86..31d99396 100644 --- a/src/annotation/string/StringAnnotation.java +++ b/src/annotation/string/StringAnnotation.java @@ -3,11 +3,11 @@ package annotation.string; import annotation.DataAnnotation; import annotation.DataAnnotationType; -public class StringAnnotation extends DataAnnotation { +public class StringAnnotation> extends DataAnnotation { private String string; - public StringAnnotation(DataAnnotationType dataAnnotationType) { + public StringAnnotation(T dataAnnotationType) { super(dataAnnotationType); } diff --git a/src/annotation/string/StringAnnotationType.java b/src/annotation/string/StringAnnotationType.java index 2dfd19d8..d9ec1e44 100644 --- a/src/annotation/string/StringAnnotationType.java +++ b/src/annotation/string/StringAnnotationType.java @@ -13,7 +13,7 @@ import annotation.handler.AnnotationOptions; * @author Doug Gillespie * */ -public class StringAnnotationType extends DataAnnotationType { +public class StringAnnotationType extends DataAnnotationType> { private String annotationName; private StringSQLLogging sqlAddon; diff --git a/src/annotation/timestamp/TimestampAnnotation.java b/src/annotation/timestamp/TimestampAnnotation.java index 9960a013..07e5d6e8 100644 --- a/src/annotation/timestamp/TimestampAnnotation.java +++ b/src/annotation/timestamp/TimestampAnnotation.java @@ -4,11 +4,11 @@ import PamUtils.PamCalendar; import annotation.DataAnnotation; import annotation.DataAnnotationType; -public class TimestampAnnotation extends DataAnnotation { +public class TimestampAnnotation> extends DataAnnotation { private long timestamp; - public TimestampAnnotation(DataAnnotationType dataAnnotationType) { + public TimestampAnnotation(T dataAnnotationType) { super(dataAnnotationType); } diff --git a/src/annotation/timestamp/TimestampAnnotationType.java b/src/annotation/timestamp/TimestampAnnotationType.java index ab90ad0c..8f49378a 100644 --- a/src/annotation/timestamp/TimestampAnnotationType.java +++ b/src/annotation/timestamp/TimestampAnnotationType.java @@ -12,7 +12,7 @@ import annotation.DataAnnotationType; * @author Doug Gillespie * */ -public class TimestampAnnotationType extends DataAnnotationType { +public class TimestampAnnotationType extends DataAnnotationType> { private String annotationName; private TimestampSQLLogging sqlAddon; diff --git a/src/annotation/userforms/UserFormAnnotation.java b/src/annotation/userforms/UserFormAnnotation.java index 362a29ad..187b5286 100644 --- a/src/annotation/userforms/UserFormAnnotation.java +++ b/src/annotation/userforms/UserFormAnnotation.java @@ -3,14 +3,14 @@ package annotation.userforms; import annotation.DataAnnotation; import annotation.DataAnnotationType; -public class UserFormAnnotation extends DataAnnotation { +public class UserFormAnnotation> extends DataAnnotation { /** * Data extracted from the logger form. */ private Object[] loggerFormData; - public UserFormAnnotation(DataAnnotationType dataAnnotationType, Object[] loggerFormData) { + public UserFormAnnotation(T dataAnnotationType, Object[] loggerFormData) { super(dataAnnotationType); this.setLoggerFormData(loggerFormData); } diff --git a/src/annotation/userforms/UserFormAnnotationType.java b/src/annotation/userforms/UserFormAnnotationType.java index 1cfe5573..61a15a05 100644 --- a/src/annotation/userforms/UserFormAnnotationType.java +++ b/src/annotation/userforms/UserFormAnnotationType.java @@ -17,7 +17,7 @@ import loggerForms.FormDescription; import loggerForms.FormsControl; import loggerForms.LoggerForm; -public class UserFormAnnotationType extends DataAnnotationType { +public class UserFormAnnotationType extends DataAnnotationType> { private UserFormAnnotationOptions userFormAnnotationOptions; @@ -201,7 +201,7 @@ public class UserFormAnnotationType extends DataAnnotationType getBinaryHandler() { + public AnnotationBinaryHandler> getBinaryHandler() { if (userFormBinaryHandler == null) { synchronized (this) { if (userFormBinaryHandler == null) { diff --git a/src/export/MLExport/MLCPODExport.java b/src/export/MLExport/MLCPODExport.java index b2f84757..44b69bb6 100644 --- a/src/export/MLExport/MLCPODExport.java +++ b/src/export/MLExport/MLCPODExport.java @@ -16,7 +16,7 @@ import us.hebi.matlab.mat.types.Struct; * @author Jamie Macaulay * */ -public class MLCPODExport extends MLDataUnitExport{ +public class MLCPODExport extends MLDataUnitExport>{ @Override public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) { diff --git a/src/export/MLExport/MLRawExport.java b/src/export/MLExport/MLRawExport.java index bdc3df72..f03d2769 100644 --- a/src/export/MLExport/MLRawExport.java +++ b/src/export/MLExport/MLRawExport.java @@ -14,7 +14,7 @@ import us.hebi.matlab.mat.types.Struct; * @author Jamie Macaulay * */ -public class MLRawExport extends MLDataUnitExport{ +public class MLRawExport extends MLDataUnitExport>{ @Override public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) { diff --git a/src/export/RExport/RCPODExport.java b/src/export/RExport/RCPODExport.java index 8501007c..1a1ba850 100644 --- a/src/export/RExport/RCPODExport.java +++ b/src/export/RExport/RCPODExport.java @@ -10,7 +10,7 @@ import cpod.CPODClick; import export.MLExport.MLCPODExport; -public class RCPODExport extends RDataUnitExport { +public class RCPODExport extends RDataUnitExport> { @Override public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) { diff --git a/src/export/RExport/RRawExport.java b/src/export/RExport/RRawExport.java index e099abe1..9d9e1b1b 100644 --- a/src/export/RExport/RRawExport.java +++ b/src/export/RExport/RRawExport.java @@ -10,7 +10,7 @@ import org.renjin.sexp.ListVector.NamedBuilder; import clickDetector.ClickDetection; -public class RRawExport extends RDataUnitExport { +public class RRawExport extends RDataUnitExport> { @Override public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) { diff --git a/src/export/wavExport/RawHolderWavExport.java b/src/export/wavExport/RawHolderWavExport.java index 181aee3a..a9fbe31e 100644 --- a/src/export/wavExport/RawHolderWavExport.java +++ b/src/export/wavExport/RawHolderWavExport.java @@ -9,7 +9,7 @@ import clickDetector.ClickDetection; * @author Jamie Macaulay * */ -public class RawHolderWavExport extends WavDataUnitExport { +public class RawHolderWavExport extends WavDataUnitExport> { @Override public double[][] getWavClip(PamDataUnit dataUnit) {