Interface EntryMergeFilter

    • Method Detail

      • apply

        java.lang.Boolean apply​(@Nonnull
                                AbstractOrderEntryModel candidate,
                                @Nonnull
                                AbstractOrderEntryModel target)
        Return Boolean.FALSE to create the item given by parameter as a separate cart entry or Boolean.TRUE to 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:
        apply in interface java.util.function.BiFunction<AbstractOrderEntryModel,​AbstractOrderEntryModel,​java.lang.Boolean>
        Parameters:
        candidate - merge candidate
        target - entry to merge the candidate into
        Returns:
        TRUE is the merge is allowed