Fixed inconsitencies
This commit is contained in:
@ -35,6 +35,7 @@ class Tx implements ITx {
|
||||
|
||||
Tx(int id, TxStream stream, TxGenerator generator, EventTime begin){
|
||||
this.id=id
|
||||
this.stream=stream
|
||||
this.generator=generator
|
||||
this.beginTime=begin
|
||||
}
|
||||
@ -48,5 +49,10 @@ class Tx implements ITx {
|
||||
public Collection<ITxRelation> getOutgoingRelations() {
|
||||
return outgoingRelations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ITx o) {
|
||||
return beginTime.compareTo(o.beginTime)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class TxStream extends HierNode implements ITxStream {
|
||||
|
||||
def generators = [];
|
||||
|
||||
private allTransactions;
|
||||
private TreeSet<Tx> allTransactions;
|
||||
|
||||
TxStream(int id, TextDb db, String name, String kind){
|
||||
super(name)
|
||||
@ -68,9 +68,11 @@ class TxStream extends HierNode implements ITxStream {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ITx> getTransactions() {
|
||||
if(!allTransactions)
|
||||
allTransactions=generators.transactions.flatten().sort{it.beginTime.value}
|
||||
public NavigableSet<ITx> getTransactions() {
|
||||
if(!allTransactions){
|
||||
allTransactions=new TreeSet<Tx>()
|
||||
allTransactions.addAll(generators.transactions.flatten())
|
||||
}
|
||||
return allTransactions
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user