public static <T> boolean hasOneItem(final Collection<T> collection) {
        return collection != null
               && collection.size() == 1;
    }
@return True if the collection is non-null and contains exactly one item
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java