bundles/org.eclipse.packagedrone.repo.adapter.p2/src/org/eclipse/packagedrone/repo/adapter/p2/internal/servlet/BinaryLocator.java
private static boolean hasKey ( final ArtifactInformation art, final String key )
    {
        if ( key == null )
        {
            return false;
        }

        final String keysString = art.getMetaData ().get ( P2RepoConstants.KEY_FRAGMENT_KEYS );
        if ( keysString == null )
        {
            return false;
        }

        final String[] keys = keysString.split ( P2RepoConstants.ENTRY_DELIMITER );
        for ( final String actualKey : keys )
        {
            if ( key.equals ( actualKey ) )
            {
                return true;
            }
        }
        return false;
    }
private static boolean hasKey ( final ArtifactInformation art, final String key )
    {
        if ( key == null )
        {
            return false;
        }

        final String keysString = art.getMetaData ().get ( P2RepoConstants.KEY_FRAGMENT_KEYS );
        if ( keysString == null )
        {
            return false;
        }

        final String[] keys = keysString.split ( P2RepoConstants.ENTRY_DELIMITER );
        for ( final String actualKey : keys )
        {
            if ( key.equals ( actualKey ) )
            {
                return true;
            }
        }
        return false;
    }
private static boolean hasKey ( final ArtifactInformation art , final String key ) { if ( key == null ) { return false ; } final String keysString = art . getMetaData ( ) . get ( P2RepoConstants . KEY_FRAGMENT_KEYS ) ; if ( keysString == null ) { return false ; } final String [ ] keys = keysString . split ( P2RepoConstants . ENTRY_DELIMITER ) ; for ( final String actualKey : keys ) { if ( key . equals ( actualKey ) ) { return true ; } } return false ; }
Check if the {@code p2.repo:fragment-keys} field contains a matching key

@param art
the artifact to check
@param key
the required key value
@return {@code true} if the artifact has a matching key entry,
{@code false} otherwise
Check if the { @code p2 . repo : fragment - keys } field contains a matching key