Package net.sf.tweety.arg.adf.transform
Class AbstractCollector<U,D,R>
- java.lang.Object
-
- net.sf.tweety.arg.adf.transform.AbstractCollector<U,D,R>
-
- Type Parameters:
U
- the type of the additional result the collector may provideD
- the type of the objects we want to collectR
- the result of the transformation
- All Implemented Interfaces:
Collector<U,D>
,Transformer<R>
- Direct Known Subclasses:
TseitinTransformer
public abstract class AbstractCollector<U,D,R> extends java.lang.Object implements Transformer<R>, Collector<U,D>
Similar toAbstractTransformer
but is designed for collections and therefore providesCollector
functionality for free.- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description AbstractCollector()
-
Method Summary
Modifier and Type Method Description U
collect(AcceptanceCondition acc, java.util.function.Consumer<D> consumer)
Traverses through the givenAcceptanceCondition
and calls the provided consumer on all the collected data.R
transform(AcceptanceCondition acc)
Transforms the given acceptance condition into another structure.
-
-
-
Method Detail
-
transform
public R transform(AcceptanceCondition acc)
Description copied from interface:Transformer
Transforms the given acceptance condition into another structure.- Specified by:
transform
in interfaceTransformer<U>
- Parameters:
acc
- the acceptance condition- Returns:
- the transformed result
-
collect
public U collect(AcceptanceCondition acc, java.util.function.Consumer<D> consumer)
Description copied from interface:Collector
Traverses through the givenAcceptanceCondition
and calls the provided consumer on all the collected data.
-
-