public static SortedSet < String > metadata ( final Map < MetaKey , String > metadata , String namespace , String key ) { final SortedSet < String > result = new TreeSet <> ( ) ; if ( namespace . isEmpty ( ) ) { namespace = null ; } if ( key . isEmpty ( ) ) { key = null ; } for ( final Map . Entry < MetaKey , String > entry : metadata . entrySet ( ) ) { if ( namespace != null && ! namespace . equals ( entry . getKey ( ) . getNamespace ( ) ) ) { continue ; } if ( key != null && ! key . equals ( entry . getKey ( ) . getKey ( ) ) ) { continue ; } result . add ( entry . getValue ( ) ) ; } return result ; }
Get all meta data values which match namespace and key