src/main/java/com/workplacesystems/utilsj/collections/TransactionalBidiTreeMap.java
private static <K,V> void copyColor(final Node<K,V> from, final Node<K,V> to,
                                  final int index) {

        if (to != null) {
            if (from == null) {

                // by default, make it black
                to.setBlack(index);
            } else {
                to.copyColor(from, index);
            }
        }
    }
private static <K,V> void copyColor(final Node<K,V> from, final Node<K,V> to,
                                  final int index) {

        if (to != null) {
            if (from == null) {

                // by default, make it black
                to.setBlack(index);
            } else {
                to.copyColor(from, index);
            }
        }
    }
copy the color from one node to another, dealing with the fact
that one or both nodes may, in fact, be null

@param from the node whose color we're copying; may be null
@param to the node whose color we're changing; may be null
@param index KEY or VALUE