Class TransferZoneGroupUtils


  • public class TransferZoneGroupUtils
    extends Object
    Utility functions around transfer zone groups
    Author:
    markr
    • Constructor Detail

      • TransferZoneGroupUtils

        public TransferZoneGroupUtils()
    • Method Detail

      • updateTransferZoneMapping

        public static <G extends TransferZoneGroup,​Z extends TransferZone> void updateTransferZoneMapping​(Iterable<G> transferZoneGroups,
                                                                                                                Function<Z,​Z> zoneToZoneMapping,
                                                                                                                boolean removeMissingMappings)
        Update the transfer zones of all transfer zone groups based on the mapping provided (if any)
        Type Parameters:
        G - type of transfer zone group
        Z - type of transfer zone
        Parameters:
        transferZoneGroups - to apply to
        zoneToZoneMapping - to use should contain original transfer zone and then the value is the new transfer zone to replace it
        removeMissingMappings - when true if there is no mapping, the transferZone is removed from the group, otherwise it is left in-tact