change database interface

This commit is contained in:
Eyck Jentzsch 2020-04-02 14:13:39 +02:00
parent 47b58ed770
commit a7afeb1f7c
5 changed files with 6 additions and 7 deletions

View File

@ -64,7 +64,7 @@ public class LevelDBLoader implements IWaveformDbLoader {
}
@Override
public List<IWaveform> getAllWaves() {
public Collection<IWaveform> getAllWaves() {
List<IWaveform> streams=new ArrayList<IWaveform>();
SeekingIterator<String, String> it = levelDb.iterator();
it.seek("s~");

View File

@ -61,7 +61,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
}
@Override
public List<IWaveform> getAllWaves() {
public Collection<IWaveform> getAllWaves() {
SQLiteDatabaseSelectHandler<ScvStream> handler = new SQLiteDatabaseSelectHandler<ScvStream>(ScvStream.class, database);
List<IWaveform> streams=new ArrayList<IWaveform>();
try {

View File

@ -50,8 +50,8 @@ public class TextDbLoader implements IWaveformDbLoader{
}
@Override
public List<IWaveform> getAllWaves() {
return new LinkedList<IWaveform>(streams);
public Collection<IWaveform> getAllWaves() {
return streams;
}
public Map<Long, ITxGenerator> getGeneratorsById() {

View File

@ -128,7 +128,7 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
* @see com.minres.scviewer.database.ITrDb#getAllWaves()
*/
@Override
public List<IWaveform> getAllWaves() {
public Collection<IWaveform> getAllWaves() {
return signals;
}

View File

@ -12,7 +12,6 @@ package com.minres.scviewer.database;
import java.io.File;
import java.util.Collection;
import java.util.List;
public interface IWaveformDbLoader {
@ -20,7 +19,7 @@ public interface IWaveformDbLoader {
public Long getMaxTime();
public List<IWaveform> getAllWaves() ;
public Collection<IWaveform> getAllWaves() ;
public Collection<RelationType> getAllRelationTypes() ;