@ SuppressWarnings ( "rawtypes" ) public Stream < Link > stream ( ) { return links . values ( ) . stream ( ) . map ( obj -> { if ( obj instanceof List ) { return ( List ) obj ; } else { return singletonList ( obj ) ; } } ) . flatMap ( Collection :: stream ) ; }
Returns a Stream of links .