@SuppressWarnings("UnusedReturnValue")
    public boolean addRange(@NonNull final Range allocatedRange) {
        if (allocatedRange instanceof AllocatedUnicastRange) {
            final AllocatedUnicastRange newAllocatedRange = (AllocatedUnicastRange) allocatedRange;
            allocatedUnicastRanges.add((AllocatedUnicastRange) newAllocatedRange);
            final ArrayList<AllocatedUnicastRange> ranges = new ArrayList<>(allocatedUnicastRanges);
            Collections.sort(ranges, addressRangeComparator);
            allocatedUnicastRanges.clear();
            allocatedUnicastRanges.addAll(Range.mergeUnicastRanges(ranges));
            return true;
        } else if (allocatedRange instanceof AllocatedGroupRange) {
            final AllocatedGroupRange newAllocatedRange = (AllocatedGroupRange) allocatedRange;
            allocatedGroupRanges.add(newAllocatedRange);
            final ArrayList<AllocatedGroupRange> ranges = new ArrayList<>(allocatedGroupRanges);
            Collections.sort(ranges, addressRangeComparator);
            allocatedGroupRanges.clear();
            allocatedGroupRanges.addAll(Range.mergeGroupRanges(ranges));
            return true;
        } else if (allocatedRange instanceof AllocatedSceneRange) {
            final AllocatedSceneRange newAllocatedRange = (AllocatedSceneRange) allocatedRange;
            allocatedSceneRanges.add(newAllocatedRange);
            final ArrayList<AllocatedSceneRange> ranges = new ArrayList<>(allocatedSceneRanges);
            Collections.sort(allocatedSceneRanges, sceneRangeComparator);
            allocatedSceneRanges.clear();
            allocatedSceneRanges.addAll(Range.mergeSceneRanges(ranges));
            return true;
        }
        return false;
    }
Add a range to the provisioner

@param allocatedRange {@link Range}
mesh/src/main/java/no/nordicsemi/android/mesh/Provisioner.java