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