private Feature [ ] featuresSorted ( Set < String > excluded ) { return this . features . values ( ) . stream ( ) . filter ( f -> ! excluded . contains ( f . name ( ) ) ) . sorted ( Comparator . comparing ( Feature :: name ) ) . toArray ( Feature [ ] :: new ) ; }
Get all the features in an array except the excluded ones in sorted order . The sorting is done on the name .