mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 14:42:27 +00:00
Generics: make compiler happy about nested extends
Signed-off-by: Merlijn van Deen <m.vandeen@fugro.com>
This commit is contained in:
parent
bb794f5deb
commit
9a4b8df0d1
@ -21,7 +21,7 @@ import generalDatabase.SQLLoggingAddon;
|
||||
* @see SoloAnnotationType
|
||||
*
|
||||
*/
|
||||
public abstract class DataAnnotationType<TDataAnnotation extends DataAnnotation> {
|
||||
public abstract class DataAnnotationType<TDataAnnotation extends DataAnnotation<?>> {
|
||||
|
||||
public abstract String getAnnotationName();
|
||||
|
||||
|
@ -5,7 +5,7 @@ import PamguardMVC.dataSelector.DataSelectorCreator;
|
||||
import annotation.DataAnnotation;
|
||||
import annotation.DataAnnotationType;
|
||||
|
||||
public abstract class AnnotationDataSelCreator<TDataAnnotation extends DataAnnotation> extends DataSelectorCreator {
|
||||
public abstract class AnnotationDataSelCreator<TDataAnnotation extends DataAnnotation<?>> extends DataSelectorCreator {
|
||||
|
||||
private DataAnnotationType<TDataAnnotation> dataAnnotationType;
|
||||
|
||||
|
@ -7,7 +7,7 @@ import PamguardMVC.dataSelector.DataSelector;
|
||||
import annotation.DataAnnotation;
|
||||
import annotation.DataAnnotationType;
|
||||
|
||||
public abstract class AnnotationDataSelector<TDataAnnotation extends DataAnnotation> extends DataSelector {
|
||||
public abstract class AnnotationDataSelector<TDataAnnotation extends DataAnnotation<?>> extends DataSelector {
|
||||
|
||||
private DataAnnotationType<TDataAnnotation> annotationType;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import annotation.DataAnnotation;
|
||||
import annotation.DataAnnotationType;
|
||||
import pamViewFX.fxSettingsPanes.DynamicSettingsPane;
|
||||
|
||||
public abstract class ScalarDataSelector<TDataAnnotation extends DataAnnotation> extends AnnotationDataSelector<TDataAnnotation> {
|
||||
public abstract class ScalarDataSelector<TDataAnnotation extends DataAnnotation<?>> extends AnnotationDataSelector<TDataAnnotation> {
|
||||
|
||||
/**
|
||||
* @return the scalarDataParams
|
||||
|
@ -3,11 +3,11 @@ package annotation.string;
|
||||
import annotation.DataAnnotation;
|
||||
import annotation.DataAnnotationType;
|
||||
|
||||
public class StringAnnotation extends DataAnnotation {
|
||||
public class StringAnnotation<T extends DataAnnotationType<?>> extends DataAnnotation<T> {
|
||||
|
||||
private String string;
|
||||
|
||||
public StringAnnotation(DataAnnotationType dataAnnotationType) {
|
||||
public StringAnnotation(T dataAnnotationType) {
|
||||
super(dataAnnotationType);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import annotation.handler.AnnotationOptions;
|
||||
* @author Doug Gillespie
|
||||
*
|
||||
*/
|
||||
public class StringAnnotationType extends DataAnnotationType<StringAnnotation> {
|
||||
public class StringAnnotationType extends DataAnnotationType<StringAnnotation<?>> {
|
||||
|
||||
private String annotationName;
|
||||
private StringSQLLogging sqlAddon;
|
||||
|
@ -4,11 +4,11 @@ import PamUtils.PamCalendar;
|
||||
import annotation.DataAnnotation;
|
||||
import annotation.DataAnnotationType;
|
||||
|
||||
public class TimestampAnnotation extends DataAnnotation {
|
||||
public class TimestampAnnotation<T extends DataAnnotationType<?>> extends DataAnnotation<T> {
|
||||
|
||||
private long timestamp;
|
||||
|
||||
public TimestampAnnotation(DataAnnotationType dataAnnotationType) {
|
||||
public TimestampAnnotation(T dataAnnotationType) {
|
||||
super(dataAnnotationType);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import annotation.DataAnnotationType;
|
||||
* @author Doug Gillespie
|
||||
*
|
||||
*/
|
||||
public class TimestampAnnotationType extends DataAnnotationType<TimestampAnnotation> {
|
||||
public class TimestampAnnotationType extends DataAnnotationType<TimestampAnnotation<?>> {
|
||||
|
||||
private String annotationName;
|
||||
private TimestampSQLLogging sqlAddon;
|
||||
|
@ -3,14 +3,14 @@ package annotation.userforms;
|
||||
import annotation.DataAnnotation;
|
||||
import annotation.DataAnnotationType;
|
||||
|
||||
public class UserFormAnnotation extends DataAnnotation {
|
||||
public class UserFormAnnotation<T extends DataAnnotationType<?>> extends DataAnnotation<T> {
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import loggerForms.FormDescription;
|
||||
import loggerForms.FormsControl;
|
||||
import loggerForms.LoggerForm;
|
||||
|
||||
public class UserFormAnnotationType extends DataAnnotationType<UserFormAnnotation> {
|
||||
public class UserFormAnnotationType extends DataAnnotationType<UserFormAnnotation<?>> {
|
||||
|
||||
|
||||
private UserFormAnnotationOptions userFormAnnotationOptions;
|
||||
@ -201,7 +201,7 @@ public class UserFormAnnotationType extends DataAnnotationType<UserFormAnnotatio
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnnotationBinaryHandler<UserFormAnnotation> getBinaryHandler() {
|
||||
public AnnotationBinaryHandler<UserFormAnnotation<?>> getBinaryHandler() {
|
||||
if (userFormBinaryHandler == null) {
|
||||
synchronized (this) {
|
||||
if (userFormBinaryHandler == null) {
|
||||
|
@ -16,7 +16,7 @@ import us.hebi.matlab.mat.types.Struct;
|
||||
* @author Jamie Macaulay
|
||||
*
|
||||
*/
|
||||
public class MLCPODExport extends MLDataUnitExport<PamDataUnit>{
|
||||
public class MLCPODExport extends MLDataUnitExport<PamDataUnit<?, ?>>{
|
||||
|
||||
@Override
|
||||
public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) {
|
||||
|
@ -14,7 +14,7 @@ import us.hebi.matlab.mat.types.Struct;
|
||||
* @author Jamie Macaulay
|
||||
*
|
||||
*/
|
||||
public class MLRawExport extends MLDataUnitExport<PamDataUnit>{
|
||||
public class MLRawExport extends MLDataUnitExport<PamDataUnit<?,?>>{
|
||||
|
||||
@Override
|
||||
public Struct addDetectionSpecificFields(Struct mlStruct, int index, PamDataUnit dataUnit) {
|
||||
|
@ -10,7 +10,7 @@ import cpod.CPODClick;
|
||||
import export.MLExport.MLCPODExport;
|
||||
|
||||
|
||||
public class RCPODExport extends RDataUnitExport<PamDataUnit> {
|
||||
public class RCPODExport extends RDataUnitExport<PamDataUnit<?, ?>> {
|
||||
|
||||
@Override
|
||||
public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) {
|
||||
|
@ -10,7 +10,7 @@ import org.renjin.sexp.ListVector.NamedBuilder;
|
||||
|
||||
import clickDetector.ClickDetection;
|
||||
|
||||
public class RRawExport extends RDataUnitExport<PamDataUnit> {
|
||||
public class RRawExport extends RDataUnitExport<PamDataUnit<?,?>> {
|
||||
|
||||
@Override
|
||||
public NamedBuilder addDetectionSpecificFields(NamedBuilder rData, PamDataUnit dataUnit, int index) {
|
||||
|
@ -9,7 +9,7 @@ import clickDetector.ClickDetection;
|
||||
* @author Jamie Macaulay
|
||||
*
|
||||
*/
|
||||
public class RawHolderWavExport extends WavDataUnitExport<PamDataUnit> {
|
||||
public class RawHolderWavExport extends WavDataUnitExport<PamDataUnit<?,?>> {
|
||||
|
||||
@Override
|
||||
public double[][] getWavClip(PamDataUnit dataUnit) {
|
||||
|
Loading…
Reference in New Issue
Block a user