Class EntryMergeFilterUnits
java.lang.Object
de.hybris.platform.commerceservices.order.impl.EntryMergeFilterUnits
- All Implemented Interfaces:
EntryMergeFilter,BiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel, Boolean>
Merge only entries with the same measurement units.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(AbstractOrderEntryModel candidate, AbstractOrderEntryModel target) ReturnBoolean.FALSEto create the item given byparameteras a separate cart entry orBoolean.TRUEto allow it to be merged into the given entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
EntryMergeFilterUnits
public EntryMergeFilterUnits()
-
-
Method Details
-
apply
public Boolean apply(@Nonnull AbstractOrderEntryModel candidate, @Nonnull AbstractOrderEntryModel target) Description copied from interface:EntryMergeFilterReturnBoolean.FALSEto create the item given byparameteras a separate cart entry orBoolean.TRUEto allow it to be merged into the given entry.Please be aware that allowing to merge does not always means the entries will be merged. There could be another filter registered, that could deny the merge.
- Specified by:
applyin interfaceBiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel, Boolean> - Specified by:
applyin interfaceEntryMergeFilter- Parameters:
candidate- merge candidatetarget- entry to merge the candidate into- Returns:
- TRUE is the merge is allowed
-