fix sonarlint issues, add IDerivedWaveform interface

This commit is contained in:
2020-11-29 10:25:48 +01:00
parent b2e269b67c
commit 6c5032da10
22 changed files with 271 additions and 233 deletions

View File

@ -25,6 +25,7 @@ import com.minres.scviewer.database.DataType
import com.minres.scviewer.database.IWaveform
import com.minres.scviewer.database.IWaveformDb
import com.minres.scviewer.database.IWaveformDbLoader
import com.minres.scviewer.database.InputFormatException
import com.minres.scviewer.database.RelationType
import com.minres.scviewer.database.tx.ITxGenerator
@ -62,7 +63,7 @@ public class TextDbLoader implements IWaveformDbLoader{
static final byte[] x = "scv_tr_stream".bytes
@Override
boolean load(IWaveformDb db, File file) throws Exception {
boolean load(IWaveformDb db, File file) throws InputFormatException {
if(file.isDirectory() || !file.exists()) return false;
this.db=db
this.streams=[]

View File

@ -33,11 +33,6 @@ class TxEvent implements ITxEvent {
return new TxEvent(kind, transaction, time);
}
// @Override
// int compareTo(IWaveformEvent o) {
// time.compareTo(o.time)
// }
@Override
public
String toString() {

View File

@ -114,7 +114,7 @@ class TxStream extends HierNode implements IWaveform {
}
@Override
public Boolean equals(IWaveform other) {
public boolean isSame(IWaveform other) {
return(other instanceof TxStream && this.getId()==other.getId());
}