Class ToSetHandler<T>
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.handler.output.ToSetHandler<T>
-
- Type Parameters:
T
- the type of object contained in the input iterable
- All Implemented Interfaces:
OperationHandler<ToSet<T>>
,OutputOperationHandler<ToSet<T>,Set<? extends T>>
public class ToSetHandler<T> extends Object implements OutputOperationHandler<ToSet<T>,Set<? extends T>>
TheToSetHandler
handlesToSet
operations by collecting the items in the inputIterable
into aSet
, removing duplicate items in the process. Use of this operation will cause all of the items present in the input iterable to be brought into memory, so this operation is not suitable for situations where the size of the input iterable is very large.
-
-
Constructor Summary
Constructors Constructor Description ToSetHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<T>
doOperation(ToSet<T> operation, Context context, Store store)
Execute the givenOutput
operation.
-
-
-
Method Detail
-
doOperation
public Set<T> doOperation(ToSet<T> operation, Context context, Store store) throws OperationException
Description copied from interface:OutputOperationHandler
Execute the givenOutput
operation.- Specified by:
doOperation
in interfaceOperationHandler<T>
- Specified by:
doOperation
in interfaceOutputOperationHandler<ToSet<T>,Set<? extends T>>
- Parameters:
operation
- theOutput
operation to be executedcontext
- the operation chain context, containing the user who executed the operationstore
- theStore
the operation should be run on- Returns:
- the output for the operation.
- Throws:
OperationException
- thrown if the operation fails
-
-