code: public Set<Range<T>> differenceToFetch(Range<T> rhs)
      {
          Set<Range<T>> result;
          Set<Range<T>> intersectionSet = this.intersectionWith(rhs);
          if (intersectionSet.isEmpty())
          {
              result = new HashSet<Range<T>>();
              result.add(rhs);
          }
          else
          {
              @SuppressWarnings("unchecked")
              Range<T>[] intersections = (Range<T>[]) new Range[intersectionSet.size()];
              intersectionSet.toArray(intersections);
              if (intersections.length == 1)
              {
                  result = new HashSet<Range<T>>(rhs.subtractContained(intersections[0]));
              }
              else
              {
                  // intersections.length must be 2
                  Range<T> first = intersections[0];
                  Range<T> second = intersections[1];
                  ArrayList<Range<T>> temp = rhs.subtractContained(first);
  
                  // Because there are two intersections, subtracting only one of them
                  // will yield a single Range.
                  Range<T> single = temp.get(0);
                  result = new HashSet<Range<T>>(single.subtractContained(second));
              }
          }
          return result;
      }
docs: Calculate set of the difference ranges of given two ranges
  (as current (A, B] and rhs is (C, D])
  which node will need to fetch when moving to a given new token
  
  @param rhs range to calculate difference
  @return set of difference ranges