protected <T> Optional<T> getUserData(Optional<? extends Node> node, WaveItem<T> waveItem) {
        if (node.isPresent()) {
            final Node n = node.get();
            return getValue(n, n::getUserData, waveItem);
        }
        return Optional.empty();
    }
protected < T > Optional < T > getUserData ( Optional < ? extends Node > node , WaveItem < T > waveItem ) { if ( node . isPresent ( ) ) { final Node n = node . get ( ) ; return getValue ( n , n :: getUserData , waveItem ) ; } return Optional . empty ( ) ; }
Gets the user data.

@param node the node
@param waveItem the wave item

@return the user data

@param <T> the generic type