@Override
    public void setConnectivity(Item item, double connectivity) {
        if (!(item instanceof TaggableItem)) {
            throw new IllegalArgumentException("setConnectivity item must be taggable, was: "
                                               + item.getClass() + " [" + item + "]");
        }
        setHasUniqueID(true);
        item.setHasUniqueID(true);
        if (connectedItem != null) {
            // untangle old connectivity
            connectedItem.connectedBacklink = null;
        }
        this.connectivity = connectivity;
        connectedItem = item;
        connectedItem.connectedBacklink = this;
    }
Common implementation for Item classes implementing the TaggableItem interface.
Note that this file exist in 3 copies that should be kept in sync:

CompositeTaggableItem.java
SimpleTaggableItem.java
TaggableSegmentItem.java

These should only have trivial differences.
(multiple inheritance or mixins would have been nice).

@author arnej27959
container-search/src/main/java/com/yahoo/prelude/query/SimpleTaggableItem.java