code: private Period setTimeUnitInternalValue(TimeUnit unit, int value) {
      int ord = unit.ordinal;
      if (counts[ord] != value) {
        int[] newCounts = new int[counts.length];
        for (int i = 0; i < counts.length; ++i) {
          newCounts[i] = counts[i];
        }
        newCounts[ord] = value;
        return new Period(timeLimit, inFuture, newCounts);
      }
      return this;
    }
docs: Sets the period to have the provided value, 1/1000 of the
  unit plus 1.  Thus unset values are '0', 1' is the set value '0',
  2 is the set value '1/1000', 3 is the set value '2/1000' etc.
  @param p the period to change
  @param value the int value as described above.
  @eturn the new Period object.