- java.lang.Object
-
- de.learnlib.filter.statistic.sul.CounterSUL<I,O>
-
- All Implemented Interfaces:
StatisticCollector
,StatisticSUL<I,O>
,SUL<I,O>
- Direct Known Subclasses:
CounterObservableSUL
,CounterStateLocalInputSUL
public class CounterSUL<I,O> extends Object implements StatisticSUL<I,O>
-
-
Field Summary
Fields Modifier and Type Field Description protected Counter
resetCounter
protected Counter
symbolCounter
-
Constructor Summary
Constructors Modifier Constructor Description CounterSUL(SUL<I,O> sul)
protected
CounterSUL(SUL<I,O> sul, Counter resetCounter, Counter symbolCounter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canFork()
Returns whether this SUL is capable offorking
.SUL<I,O>
fork()
Forks this SUL, if possible.Counter
getResetCounter()
StatisticData
getStatisticalData()
Returns this statistical data gathered by this collector.Counter
getSymbolCounter()
void
post()
shut down SUL.void
pre()
setup SUL.O
step(I in)
make one step on the SUL.
-
-
-
Method Detail
-
pre
public void pre()
Description copied from interface:SUL
setup SUL.
-
post
public void post()
Description copied from interface:SUL
shut down SUL.
-
canFork
public boolean canFork()
Description copied from interface:SUL
Returns whether this SUL is capable offorking
.- Specified by:
canFork
in interfaceSUL<I,O>
- Returns:
true
if this SUL can be forked,false
otherwise- See Also:
SUL.fork()
-
fork
public SUL<I,O> fork()
Description copied from interface:SUL
Forks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reseted SUL, regardless of whether this call is made between a call toSUL.pre()
andSUL.post()
.If
SUL.canFork()
returnstrue
, this method must return a non-null
object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, aUnsupportedOperationException
must be thrown.Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.
-
getStatisticalData
public StatisticData getStatisticalData()
Description copied from interface:StatisticCollector
Returns this statistical data gathered by this collector.- Specified by:
getStatisticalData
in interfaceStatisticCollector
- Returns:
- the statistical data gathered by this collector
-
getResetCounter
public Counter getResetCounter()
-
getSymbolCounter
public Counter getSymbolCounter()
-
-