/** * Allow override of the key, particular useful if we're constructing in 2 stages like the offset mechanism * * @param key the new key */ private void setKey(final VerseRange key) { if (key.getCardinality() == 1) { this.qualifiedKey = key.getStart(); } else { this.qualifiedKey = key; } this.wholeKey = this.qualifiedKey.getWhole(); }
/** * If leftKey is non-null (i.e. not attached to a simple specifier, then adds to the kjvTo mappings * * @param kjvVerses the kjv verses * @param leftKey the left-hand key, possibly null. */ private void addKJVToMapping(final QualifiedKey kjvVerses, final Verse leftKey) { // NOTE(DMS): Both kjvVerses and left key are each a single verse if (leftKey != null) { getNonEmptyKey(this.fromKJVMappings, kjvVerses).addAll(leftKey); // If we have a part, then we need to add the whole verse as well... if (!kjvVerses.isWhole()) { getNonEmptyKey(this.fromKJVMappings, QualifiedKey.create(kjvVerses.getKey().getWhole())).addAll(leftKey); } } }