private void setDotCount(int dotCount) { Fraction checkSum = getCleanLength(); for (int i = 1; i <= dotCount; ++i) { checkSum = checkSum.add(getCleanLength().divide(pow(2, i))); } this.setLength(checkSum); }