Class ElementAggregator
- java.lang.Object
-
- uk.gov.gchq.koryphe.composite.Composite<C>
-
- uk.gov.gchq.koryphe.binaryoperator.BinaryOperatorComposite<uk.gov.gchq.koryphe.tuple.Tuple<R>,uk.gov.gchq.koryphe.tuple.binaryoperator.TupleAdaptedBinaryOperator<R,? extends Object>>
-
- uk.gov.gchq.koryphe.tuple.binaryoperator.TupleAdaptedBinaryOperatorComposite<String>
-
- uk.gov.gchq.gaffer.data.element.function.ElementAggregator
-
- All Implemented Interfaces:
BiFunction<uk.gov.gchq.koryphe.tuple.Tuple<String>,uk.gov.gchq.koryphe.tuple.Tuple<String>,uk.gov.gchq.koryphe.tuple.Tuple<String>>
,BinaryOperator<uk.gov.gchq.koryphe.tuple.Tuple<String>>
public class ElementAggregator extends uk.gov.gchq.koryphe.tuple.binaryoperator.TupleAdaptedBinaryOperatorComposite<String>
AnElementAggregator
is aBinaryOperator
which aggregates twoElement
objects into a single element.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElementAggregator.Builder
static class
ElementAggregator.SelectedBuilder
-
Constructor Summary
Constructors Constructor Description ElementAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Element
apply(Element state, Element element)
Aggregates the element.Properties
apply(Properties state, Properties properties)
boolean
equals(Object obj)
List<uk.gov.gchq.koryphe.tuple.binaryoperator.TupleAdaptedBinaryOperator<String,?>>
getComponents()
int
hashCode()
void
lock()
Prevent any further changes being carried out.String
toString()
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
apply
public Element apply(Element state, Element element)
Aggregates the element. Note - only the element properties are aggregated. Aggregation requires elements to have the same identifiers and group.- Parameters:
state
- the other element to aggregate. This is normally the 'state' where the aggregated results will be set.element
- the element to aggregated- Returns:
- Element - the aggregated element
-
apply
public Properties apply(Properties state, Properties properties)
-
getComponents
public List<uk.gov.gchq.koryphe.tuple.binaryoperator.TupleAdaptedBinaryOperator<String,?>> getComponents()
- Overrides:
getComponents
in classuk.gov.gchq.koryphe.tuple.binaryoperator.TupleAdaptedBinaryOperatorComposite<String>
-
lock
public void lock()
Prevent any further changes being carried out.
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
-