code: private void homogeneousUnion(final HLL other) {
          switch(type) {
              case EMPTY:
                  // union of empty and empty is empty
                  return;
          case EXPLICIT:
              for(final long value : other.explicitStorage) {
                  addRaw(value);
              }
              // NOTE:  #addRaw() will handle promotion, if necessary
              return;
          case SPARSE:
              for(final int registerIndex : other.sparseProbabilisticStorage.keySet()) {
                  final byte registerValue = other.sparseProbabilisticStorage.get(registerIndex);
                  final byte currentRegisterValue = sparseProbabilisticStorage.get(registerIndex);
                  if(registerValue > currentRegisterValue) {
                      sparseProbabilisticStorage.put(registerIndex, registerValue);
                  }
              }
  
              // promotion, if necessary
              if(sparseProbabilisticStorage.size() > sparseThreshold) {
                  initializeStorage(HLLType.FULL);
                  for(final int registerIndex : sparseProbabilisticStorage.keySet()) {
                      final byte registerValue = sparseProbabilisticStorage.get(registerIndex);
                      probabilisticStorage.setMaxRegister(registerIndex, registerValue);
                  }
                  sparseProbabilisticStorage = null;
              }
              return;
          case FULL:
              for(int i=0; i<m; i++) {
                  final long registerValue = other.probabilisticStorage.getRegister(i);
                  probabilisticStorage.setMaxRegister(i, registerValue);
              }
              return;
          default:
                  throw new RuntimeException("Unsupported HLL type " + type);
          }
      }
docs: Computes the union of two HLLs of the same type, and stores the
  result in this instance.
  
  @param other the other {@link HLL} instance to union into this one. This
  cannot be <code>null</code>.