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 toAbstractTransformerbut is designed for collections and therefore providesCollectorfunctionality for free.- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description AbstractCollector()
-
Method Summary
Modifier and Type Method Description Ucollect(AcceptanceCondition acc, java.util.function.Consumer<D> consumer)Traverses through the givenAcceptanceConditionand calls the provided consumer on all the collected data.Rtransform(AcceptanceCondition acc)Transforms the given acceptance condition into another structure.
-
-
-
Method Detail
-
transform
public R transform(AcceptanceCondition acc)
Description copied from interface:TransformerTransforms the given acceptance condition into another structure.- Specified by:
transformin 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:CollectorTraverses through the givenAcceptanceConditionand calls the provided consumer on all the collected data.
-
-